Use template_format.parse for local stack parsing

Previously, API requests contained parsed templates for
json templates, but string content for YAML templates.

This change means that all requests will now contain parsed
templates. A parsed templates is required for get_file
client-side processing.

According to profiling that Clint performed, YAML parsing
could become a significant source of heat server load, so this
change will also mitigate this by pushing out YAML parsing
load to the clients.

This is part of a refactoring in preperation for
supporting the get_file intrinsic function.

Change-Id: Icca0f5e8ad197433872a995419648f841c9f82e0
reconcile prepare_environment_file/url into one funtion

This is part of a refactoring in preperation for
supporting the get_file intrinsic function.

Change-Id: I5c4a16d76fa29f7be2e4db737ebec49fdc1644e4
Merge "Use template_format.parse for local stack parsing"
Merge "reconcile prepare_environment_file/url into one funtion"