Use ResourceDefinition for creating Resources

Initialise resources with a ResourceDefinition object rather than a JSON
snippet from a template. We no longer need to store the json_snippet (since
the resolving of intrinsic functions is reversible when necessary), so get
rid of it.

Change-Id: I23d183d986ab1d771407502ec926e736d1f48d79
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 "Use ResourceDefinition for creating Resources"
Merge "Get the dependency graph directly from functions"