Create instance with deleting image

If we attempt to create a new instance with an image that has just now
been deleted in glance, (ie. status="DELETED", but deleted=False).

The server should throw a 4XX error rather than a 5XX error.

This commit just adds tests.

Tests bug 1155458
Change-Id: Ifae470e96ddc4526ef67581a1d7171ccc5fd32b7
Performance optimization for contrib.flavorextraspecs

In method FlavorExtraSpecsController.index():
This method calls FlavorExtraSpecsController._get_extra_specs()
that returns all extra_specs that has flavor.
In db.api layer we are returning already extra_specs as plain object,
so there is no reason to make one more time copy of extra_specs.

In method FlavorExtraSpecsController.show():
This method should return extra_spec that corresponds to specified
key and flavor_id.
Was:
Get all extra_specs by flavor_id and filter by key locally
Now:
Filter by flavor_id and key in db.

Change-Id: I4c39f5f56511e67e37482cda1b4e9771ee9c7d7d
Merge "Create instance with deleting image"
Merge "Performance optimization for contrib.flavorextraspecs"