Get the dependency graph directly from functions

Prior to this change, while template formats were pluggable, only the
intrinsic functions defined by HOT and CloudFormation could affect
the dependency graph. This moves knowledge of the template format out of
the Resource class and allows the ResourceDefinition to determine it in a
format-independent manner by collecting it from the intrinsic functions
defined by the template plugin.

Change-Id: I592ac2074a600a44578ce97309def1280c72e61d
Merge "Get the dependency graph directly from functions"