Improve performance for checking hosts AZs

When updating aggregate metadata or when adding a host into aggregate,
a check is done to make sure that hosts can't be in multiple AZs.

In order to do the check, the routine was looping over each host to look
in the DB which AZs the host is part of.
As it's quite hungry in terms of DB accesses, here the proposal is to
extend the helper method for getting all AZs by also having their hosts,
and so only do memory iterations.

Partial-Bug: #1277230

Change-Id: I7c5bc980acb17f0a0e1f8c1403dac66c305866fb
Create lvm.py module containing helper API for LVM

Currently there are some LVM API calls in 'nova/virt/libvirt/utils.py'
and also many other APIs are there.
To make a role of the code be clear, I would like to suggest to
create 'nova/virt/libvirt/lvm.py' and move APIs which are related
to LVM to lvm.py.

Change-Id: I4d80f574631d52012152c72d1db3069dd57a5550
Signed-off-by: Mitsuhiro Tanino <mitsuhiro.tanino@hds.com>
Implements: blueprint lvm-driver-for-shared-storage
Log exception if max scheduling attempts exceeded

This logs the last exception seen by the scheduler to help troubleshooting.

When an administrator shows an errored instance, the fault reported is
NoValidHost which is easily misread as insufficient capacity.

This is currently covered by tests.

Change-Id: I636ec9809ded2d4e3404c1f13e0d7635b9826bfe
Merge "Create lvm.py module containing helper API for LVM"
xenapi: reorder volume_utils

Grouping related functions together. Renamed _create_pbd to show it is
not called outside volume_utils.

Change-Id: If6106a81d58e059e2e683ad0556d4225a9b894e2
Merge "Log exception if max scheduling attempts exceeded"
Merge "xenapi: reorder volume_utils"
Merge "Improve performance for checking hosts AZs"