xenapi: Cleanup tar process on glance error

Currently, when the network connection to glance is interrupted, there
is different behaviour on upload and download.

This change ensures the behaviour between the two code paths is more
consistent.

Uploads generally need to be given more time before they timeout, so
to keep a single timeout between upload and download, the timeout is
increased to 90 seconds.

At the same time, it ensures the tar process gets killed when any
issues occur with the communication between the hypervisor and
glance.

Change-Id: Id5396e5d3c1052dc2979476a886412da65e08670
Closes-Bug: #1284596
Instance groups: add method get_by_hint

In order to support backward compatibility a new method
'get_by_hint' has been added. This method will check if the
hint is a uuid and if no it will return get_by_uuid else it
will return get_by_name.

Change-Id: I728bf3454dc5a5367e21f242281719c1a967269a
Partial-bug: #1303360
Merge "xenapi: Cleanup tar process on glance error"
Make _is_multi_host() use objects

This makes the network api _is_multi_host() method use objects
instead of direct database access so that compute manager can
call it directly.

Note that the previous unit tests for this method used the
random.choice() method to selectively test the is/is-not multihost
case. Unit tests should not be non-deterministic like this, for
coverage and stability reasons. This patch pulls out the two
possibilities for each into separate cases to ensure both are
tested.

Related to blueprint compute-manager-objects-juno

Change-Id: I432a759a666948f2cfaa29d82f749dc9a39141be
Merge "Instance groups: add method get_by_hint"