Delete iSCSI devices after volume detached

Previously, after detaching from a volume, the iSCSI device
remains attached on the compute node until all LUNs for a given
IQN are detached -- causing issues when LUNs are reused for
different volumes. This change will delete the device(s)
associated with the detached volume so LUNs can be reused.

Fixes bug 1112483
Change-Id: Icae3ec4d1ee2036fbba7b9eb5c03a1c86014fcc0
Rename instance_type to flavor in xenapi virt driver

Renames 'instance_type' to 'flavor' in the xenapi virt driver and
associated tests.

Part of blueprint flavor-instance-type-dedup

Change-Id: I0f1a17b725102eab30ce90714b50444d8d140da0
Better exception handling for deletes during build

To retain parity with the current run_instance boot process we should
not set the instance to ERROR if a delete occurs while it's building.

Some instance updates were moved into try/except blocks so the
task_state check failures are handled properly.  And a test for a
condition that can't occur was removed.

Part of bp remove-cast-to-schedule-run-instance

Change-Id: I688059404d6b697bd21f6037252dbe628c1b24f2
Whitelist external netaddr requirement

* tox.ini(testenv.install_command): Use the --allow-external and
--allow-insecure options so that pip 1.5 and later will assent to
retrieve the netaddr package even though it's not hosted on PyPI.
The --allow-insecure option is aliased to a clearer
--allow-unverified wording in 1.5, but the old form is being used to
avoid breaking users of 1.4.x and will be valid at least through
1.6.x according to comments in the pip source.

Partial-Bug: #1266513

Change-Id: I005e752c8cb9bca78b1ebe777eb5230e9bf05bd8
Don't deallocate/reallocate networks on reschedules

If network allocation is not host dependent we don't need to deallocate
and reallocate a network for each reschedule.  Only baremetal has host
dependent allocation so for that driver networks are de/reallocated on a
reschedule.

The current method in the code which checks for the length of the list
returned from _get_instance_nw_info() doesn't work because it can't
distinguish between an unallocated network and one that doesn't return
network information.

Part of bp remove-cast-to-schedule-run-instance

Change-Id: Ic427715f46cb5179a37c593c4217f239c65544c3
Merge "Rename instance_type to flavor in xenapi virt driver"
Merge "Better exception handling for deletes during build"
Merge "Don't deallocate/reallocate networks on reschedules"
Merge "Whitelist external netaddr requirement"
Merge "Delete iSCSI devices after volume detached"