Refactor integrated tests to support V2 and V3 API testing

Refactors the integrated test classes so they can be used
for both V2 and V3 API testing. No actual V3 testing is
added in this changeset.

Partially implements blueprint v3-api-unittests
Partially implements blueprint v3-api-specification

Change-Id: Ic7d7b513c3bc19ac1962c0a8489b55e9685fb7c0
Add passing a logging level to processutils.execute

Previously, processutils.execute always logged what commands were
run at DEBUG level.  This is usually fine, but sometimes the caller
wants to log particularly important commands at INFO level instead,
and oslo should allow that.

This is oslo-incubator aa5b65882.  No other significant changes had
been made to processutils in oslo since the last sync.

Change-Id: I09dad3759bf2f759b297ee19205cf0460b9a6baa
Add migration with missing fkeys

There are few ForeignKeys that had been skipped in migrations
and declared in models.
This patch adds these relationships into db by new migration.

bp: db-sync-models-with-migrations

Change-Id: I63e6a853ec16b80ea52b1c0e8a94f8f60819312c
Fix project_user_quotas_user_id_deleted_idx index

The project_user_quotas_user_id_deleted_idx index in the 203 migration
for the project_user_quotas table was using the wrong column, it should
be using user_id instead of project_id since there is already an index
for the project_id column (defined directly above it).

Fixes bug 1205693

Change-Id: I6899afe5b57432345f69b4ee91ef947a4b9ef5c9
Merge "Refactor integrated tests to support V2 and V3 API testing"
Merge "Fix project_user_quotas_user_id_deleted_idx index"
Merge "Add passing a logging level to processutils.execute"
vm_state and task_state not updated during instance delete

Fixes: bug #1212496
Change-Id: I4f4e45160008d3eb57f4f0935f13e22b6a561430