Volume operations should be blocked for non-null task state

Currently volume attach, detach, and swap check on vm_state but
not task_state.  This means that, for example, volume attach is
allowed even when other operations such as migration are in
progress.  As with other operations the check should be against
a task state of "None"

This change also refactors the volume_attach() method a little
so that the cells api can include the state decorator checks.

Change-Id: I0c4d697cf9d9e431a050c3c1b03e46b8629d182a
Closes-Bug: #1274627
xenapi: Fix test_rescue test to ensure assertions are valid

The assertion in this test gathers the list of VDI references and then
checks if the string 'swap' isn't in the list. A VDI reference is a
UUID, so the string 'swap' will never match, even if the code being
tested is buggy.

Compare against an actual VDI reference. Also, add a positive assertion
to check that the root disk from the original VM is attached.

Change-Id: I3e3e9798ce63f2f260b7993620fde3749452bfc9
Closes-bug: 1290903
Make nova-network use quotas object

This makes nova-network use the quotas object for its work.

Related to blueprint nova-network-objects
Related-bug: 1290568

Change-Id: I416f63d2a4e4aa8220931ccf8f386009902e653e
Make nova-network use conductor for security groups refresh

This makes nova-network use the existing conductor interface for
triggering security groups member refreshes.

Related to blueprint nova-network-objects

Change-Id: Ieca163d67cd005534acb225df83457d755295af9
Related-bug: 1290568
Block database access in nova-network binary

This mirrors the code we have in cmd/compute.py to wedge the database
module so that we can't add any more direct calls, and will highlight
any stragglers.

Related to blueprint nova-network-objects

Change-Id: Ib12415d84de950265626b4a804f33717203d9765
Related-bug: 1290568
Merge "Make nova-network use quotas object"
Merge "xenapi: Fix test_rescue test to ensure assertions are valid"
Merge "Make nova-network use conductor for security groups refresh"
Merge "Block database access in nova-network binary"
Merge "Volume operations should be blocked for non-null task state"