Currently, we load all the resources from the database to resolve
template functions of dependent resources. In convergence, because
every worker will load it's own stack object, loading all the
resources for every resource lifecycle operation will be inefficient.
This patch allows creating lightweight stacks using a cache provided
which will never query the database and only depend on the template
and the cache provided. Function resolutions will now happen by querying
the values in the cache provided if it exists else None is returned.
The resultant lightweight stack will effectively be the stack attributes
loaded from the database and it's raw template with the dependent
resource's functions resolved which will serve as the input for
individual resource objects that will be worked upon.