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
Raise traceback on error when using CLI and -debug

When --debug is specified to the CLI don't just print the simple error
message but actually reraise that error.

Change-Id: I616eda8e033342cff7f3412e3a414a7530ef3848
Closes-Bug: #1268202
Merge "Use template_format.parse for local stack parsing"
Merge "reconcile prepare_environment_file/url into one funtion"
Merge "Raise traceback on error when using CLI and -debug"