vm_state and task_state not updated during instance delete

This bug was recently introduced during conversion of the
terminate_instance to the new object models.
https://review.openstack.org/#/c/36363
Fixed by calling the save method of the new model.
Also updated tests to use primitive instance so it is
converted to new object model by object_compat decorator
in the compute manager.

Related to: blueprint compute-api-objects
Fixes: bug #1212496
Change-Id: I4f4e45160008d3eb57f4f0935f13e22b6a561430
update neutronclient to 2.3.0 minimum

Change-Id: I21f9ae030a173621db3d21db018c3a416d050813
Use utils.execute instead of subprocess

Removes rogue subprocess.Popen calls to make better use of
nova.utils.execute where appropriate to benefit from the
patches pushed into oslo.

Fixes bug 1053382

Change-Id: Iaee5379edd51f215a51d55263196dd6c0d2de0c3
Adds Hyper-V dynamic memory support

Blueprint: hyper-v-dynamic-memory

Memory overcommit in Hyper-V is handled with a feature called dynamic
memory (memory ballooning). This change adds a configuration option to
enable it.

The value of dynamic_memory_ratio expresses the ratio between the total
RAM assigned to an instance and its startup RAM amount. For example a
ratio of 2.0 for an instance with 1024MB of RAM implies 512MB of RAM
allocated at startup.

Unit tests have been added for this feature as well.

DocImpact
Change-Id: I036eaa3e739d995c6a5bcfb022bf2ed0a999085e
Adds Hyper-V VHDX support

Blueprint: hyper-v-vhdx

The VHDX virtual disk format has been introduced with Hyper-V Server 2012
providing performance and management improvements.

Unlike the VHD format, VHDX allows to resize differencing disks. This
reduces the requirements for local disk space in case of CoW images and
improves the performance of the first spawn operation for any given image
and flavor combination.

Supporting the VHDX format in Hyper-V requires the WMI V2 namespace.

Unit tests have been added accordingly.

Change-Id: Idddec06b9639e22d69426562d1b5a0cbf2890ccf
Adds ephemeral storage support for Hyper-V

Blueprint: hyper-v-ephemeral-storage

This patchset adds support for creating an ephemeral storage dynamic
VHD or VHDX (based on the versions of vhdutils used) when an instance is
spawned.

The ephemeral disk is correctly migrated during migration/resize and
live migration.

The ephemeral virtual disk is not partitioned or formatted, leaving the
task to guest side tools (e.g.: cloud-init or cloudbase-init).

Change-Id: I0b5d6b55ccdc981efcd507c45184fb2d528bf9c1
Merge "Adds Hyper-V dynamic memory support"
Merge "Adds Hyper-V VHDX support"
Merge "Adds ephemeral storage support for Hyper-V"
Merge "vm_state and task_state not updated during instance delete"
Merge "update neutronclient to 2.3.0 minimum"
Merge "Use utils.execute instead of subprocess"