Rename instance_type to flavor in nova.network tree

Renames 'instance_type' to 'flavor' in the nova.network tree along with
related tests.

Note that 'instance_type_id' is part of the Instance table in the data
model and is not touched as part of this change.

Part of blueprint flavor-instance-type-dedup

Change-Id: I7319315daa77b7334f6d5509cf87faa71148f8ef
Add flavor access methods to Instance object

This adds a native interface to the Instance object to get, save, and
delete either the main or stashed flavors. This will let us migrate
code away from flavors.py and also provide us a versioned method to
handle conversion of flavors, flavor extra specs, and system_metadata
to the JSON blob that we have planned.

Related to blueprint compute-manager-objects

Change-Id: I13a4903460b05798e9c95b2148fe93e4963d6361
Move restore and rebuild operations to Flavor objects

This makes the compute_api restore and rebuild operations use
Flavor objects for their reservation and record-keeping activities.

Related to blueprint compute-manager-objects

Change-Id: If55294e0e1ce678448ee0e9e11fc7b64b5a73386
Make ec2 use Flavor object

This makes the ec2 API use the Flavor object directly. Note that
it also corrects some old usage of non-object instances along
the way.

Related to blueprint compute-manager-objects

Change-Id: Ic13746e085169b6cc0a25fa815c6894a8020c437
Handle InstanceUserDataMalformed in create server v2 api

The following patch adds missing support for handling
InstanceUserDataMalformed. In addition, it also adds test cases
in both the v2 and v3 api.

Change-Id: I1b474318248f64eed994f67c6d91db38d5579a63
Closes-bug: #1257146
Merge "Handle InstanceUserDataMalformed in create server v2 api"
Merge "Add flavor access methods to Instance object"
Merge "Move restore and rebuild operations to Flavor objects"
Merge "Make ec2 use Flavor object"
Merge "Rename instance_type to flavor in nova.network tree"