Always return Resource from ResourceDefinition.dependencies()
Always return Resource from ResourceDefinition.dependencies()

Don't assume that function.dependencies() always returns the Resource
object from the provided Stack. (In the future it will return a
ResourceProxy object.) Instead, look up the Resource object we want from
the Stack, as we do with e.g. explicit dependencies (depends_on).

Change-Id: I46d74f760c7222ba3c54ed10beb829bd7ea7746f
Partially-Implements: blueprint stack-definition

openstack/heat,noironetworks/heat,noironetworks/heat,openstack/heat