Make scheduler remove dead nodes from its cache.

Scheduler HostManager maintains and updates a cache of all compute
nodes in its host_state_map. However, entries were never deleted from
this mapping, even when the compute nodes were marked as deleted.

This patch removes a state_key from host_state_map when it is not
returned from db.compute_node_get_all, and logs a notice about it.
It also adds unit tests which check for this behaviour.

Change-Id: Ibe6c98dd6c2eb02983db47f263d86cb1b76e1c98
filter_scheduler: Select from a subset of hosts.

Adding a subset of best hosts to choose a host from, instead
of choosing the host with the highest weight. The subset size is
configurable. Setting the subset size to 1 will mimic the old
behavior.

DocImpact

Change-Id: Icc6f8a7ca7cf992d99b872a45e241f13fa6e1536
Fixes: bug 1098635
Add an update option to run_tests.sh

This commit adds an update option to run_tests.sh. This option
is used to rerun install_venv.py on an already installed venv.
This will then just update out of date packages with pip.

Change-Id: Iac065f71a64a6a7f7f2ee000ee01be9f78af6754
[xenapi] Cooperatively yield during sparse copy

On a resize down the sparse copy blocks other operations from running on
the compute node, and can take a long time to finish.  This patch adds a
greenthread yield to not block other things from happening on the
compute node.

Change-Id: I1287a6a0bb3157ad0e5eafe53b02db21849650fa
VirtualPowerDriver catches ProcessExecutionError.

Baremetal virtual_power_driver now catches ProcessExecutionError coming
from ssh_execute and logs an exception. Requested actions (eg, power_on)
return an error state instead of raising an exception.

Change-Id: I8f66ba843e12de13f9a14d736f7bef2eda4ef85c
Merge "[xenapi] Cooperatively yield during sparse copy"
Merge "Add an update option to run_tests.sh"
Merge "filter_scheduler: Select from a subset of hosts."
Merge "Make scheduler remove dead nodes from its cache."
Merge "VirtualPowerDriver catches ProcessExecutionError."