xenapi: retry when plugin killed by signal

Sometimes the glance upload will get killed because of a signal. We
should retry the upload on these types of errors.

It is currently unclear where the signal comes from, so further
investigation is required to determine why the signal gets raised. It
does not appear that any services are restarting at the time the signal
gets raised.

This change has also increased the coverage around the unit tests for
the glance upload, so we now test the try logic.

Fixes bug 1207746
Change-Id: I116be92e153cf27c353cb20168a67b2c0b3cd595
Merge "xenapi: retry when plugin killed by signal"