LXC: Image device should be reset in mount() and teardown()

When fixing bug#1208387, image device name is returned in function
setup_container. But it's missed to reset in function mount() and
teardown().

This patch is to fix it. We now just return the device name when
mounting disk image during setting up container and remove the
member variable 'device' from Class _DiskImage added in last patch.

Closes-bug: #1243108
Related-bug: #1208387

Change-Id: I2aaed6f3367edce4fb23b78f0e979440954609a8
libvirt: consider minimal I/O size when selecting cache type

The "none" cache type is not usable when a file-system
has stricter alignment and minimal I/O size requirements,
for example the xfs file-system created with 4kiB sector size,
requires all DIRECT I/O operation has to be done with
 integer multiple of 4 kiB count/size.

qemu assumes direct I/O is doable with 512 byte minimal size,
so the  _supports_direct_io method needs to check is
the direct I/O doable with 512 byte size.

Change-Id: I5e1ba4e8afa87519cb0ed1120c213f7c318ccef2
Remove deprecated config aliases

Now that we are in Icehouse, remove deprecated config options from
Havana.

I57b5861e57168c44729934757e732de962f3d91a incorrectly labeled the vmware
options as deprecated in icehouse when they were actually deprecated in havana in
Ic9b425a3d9ea2b614643ba8d3db50b065947c806

DocImpact: Configurations that were previously deprecated in Icehouse
are now not recognized.

Change-Id: I64548e40f6cea42275a6f0f3ebdc0c4cd9324804
Rename instance_type to flavor in nova.cloudpipe

Renames 'instance_type' to 'flavor' in the nova.cloudpipe module.

The deprecated vpn_instance_type option is removed as part of
change I64548e40f so I leave it untouched here.

Part of blueprint flavor-instance-type-dedup

Change-Id: Id4fd757fabfb81ee81999e7978c924aabd0a712b
Rename instance_type to flavor in nova.utils and nova.compute.utils

Renames 'instance_type' to 'flavor' in nova.utils and nova.compute.utils
and related tests. Removes the unused fake_get method in
test_compute_utils.

Note that the nova.notifications payload isn't updated yet to store
flavor instead of instance_type so this patch still uses
payload['instance_type'] when processing the notification in
test_compute_utils.

Note that instance_type_id and the instance_type_* keys in
system_metadata are part of the data model and would require a database
migration to change, so those are not part of this patch.

Part of blueprint flavor-instance-type-dedup

Change-Id: I56815e5c8238f8e4ad4e3a2a599310da2b7f4568
Retry on deadlock in instance_metadata_update

THe instance_metadata_update() method in the sqlalchemy db API may hit a
DBDeadlock, as shown in the bug report.  Apply the necessary decorator
that will have the method retry in that case.

Change-Id: Ice3f13857ba8f4ee1d1d2dc06cef293e6d17daca
Closes-bug: #1262154
Merge "Remove deprecated config aliases"
Merge "Retry on deadlock in instance_metadata_update"
Merge "Rename instance_type to flavor in nova.cloudpipe"
Merge "Rename instance_type to flavor in nova.utils and nova.compute.utils"
Merge "LXC: Image device should be reset in mount() and teardown()"
Merge "libvirt: consider minimal I/O size when selecting cache type"