CA-204474: Cancel and wait for outstanding tasks in hard_reboot/shutdown
CA-204474: Cancel and wait for outstanding tasks in hard_reboot/shutdown

Signed-off-by: Jon Ludlam <e7e3380887a8f95cc9dc4f0d51dedc7e849a287a@citrix.com>

jjd27/xen-api,jjd27/xen-api,jjd27/xen-api,jjd27/xen-api,jjd27/xen-api,jjd27/xen-api