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
Pass migration_ref when when auto-confirming

The _poll_unconfirmed_resizes() task in compute/manager calls back to
compute_api to confirm resizes. This triggers a db lookup for the
migration, which is not allowed by no-db-compute. Since we already have
the migration, pass it through to avoid the lookup.

Since this doesn't change rpcapi (and thus, RPC clients should not
know about this optional paramter), we don't need to bump the RPC
version here.

Fixes bug 1152792

Change-Id: I4bd3b0c88968ed7f64e7df0afa12e83009ee8ccf
Merge "Add numerous fixes to test_api_samples"
Merge "Pass migration_ref when when auto-confirming"