Add numerous fixes to test_api_samples

- Throw IOError when a template for POST/PUT operations
  does not exist instead of returning an API response error
- Create template and sample on first run when those
  don't exist. It takes two runs of this module now
  to get those files first populated.
- Fix error labels to now specify whether we are referring to
  a sample or response when comparing response results
- Call _pretty_data() only once on sample_data before this
  param is passed to _compare_results(). This change cut the
  total execution time by .5 seconds or 1%. :)
- Create response template files which content is the same as
  its response body instead of currently 0-length body.
Fixes bug 1140384

Change-Id: Ic62ae343409b2084e6a238025a86f0b7909a1b76
Merge "Add numerous fixes to test_api_samples"
Merge remote-tracking branch 'm_src_repo/master' into build-temp