Allow some instance polling periodic tasks to hit db slave

If your deployment has a slave configured, poll_*instance* periodic
tasks will send their reads to the slave. If you have no slave
configured, there is no change to behavior.

Note for developers, I have targeted all the easy tasks. By this I
mean tasks that were already using the InstanceList object and the
get_all_by_filters or get_all_by_host methods. I will slaveify the
other tasks in seperate reviews since they also require conversion
to using objects.

Change-Id: I4bead5d350d633d726d4564b4bc1baec2e2977b7
Partially-implements: blueprint periodic-tasks-to-db-slave
The private method _text_node should be used as function

If the class method does not reference any of the class attributes
it may be more clear to define the method as a static function instead.

Change-Id: I273e00fc4ab6fecafcd7bdeaf3b809a6688025c5
xenapi: refactor resize_up_root_vdi

Some refactoring to move things into vm_utils where possible, and
setting the stage for resizing ephemeral disks.

Needed by blueprint xenapi-resize-ephemeral-disks
Change-Id: Iba26ddb8b3d9041981317c47bb3b53733c004cea
xenapi: refactor generate_ephemeral

Refactoring generate_ephemeral so it will be easier to generate
individual ephemeral disks when required.

Needed by blueprint xenapi-resize-ephemeral-disks
Change-Id: I7032bd4c7d80adb62f8d5ece085170c6b89e267d
xenapi: resize up ephemeral disks

After adding the ability to migrate ephemeral disks, we were unable to
perform any resize of ephemeral disks.

This change implements the ability to increase the size of ephemeral
disks, if that is required be the selected flavor.

Unlike with the root disk, we attempt to expand the partition and
filesystem will never be touched by the resize up process.

However, after this change, you will still not be able to resize down
the ephemeral disks. This function has proved very error prone when
dealing with root disks, so we are not implementing this feature for
ephemeral disks, and will error on requests to reduce the size of
ephemeral disks.

Implements blueprint xenapi-resize-ephemeral-disks
Change-Id: I218e9db9f5c912335c96da9831b300513213d33d
Merge "xenapi: refactor resize_up_root_vdi"
Merge "xenapi: refactor generate_ephemeral"
Merge "xenapi: resize up ephemeral disks"
Merge "Allow some instance polling periodic tasks to hit db slave"
Merge "The private method _text_node should be used as function"