CA-31096: fix the race between vbd pause and shutdown
CA-31096: fix the race between vbd pause and shutdown

The following interleaving led to trouble:

   vbd pause request           vbd shutdown request
                               vbd shutdown succeeds
                               delete backend
   <-- vbd pause request thread blocks forever because it is waiting
       either for pause-done or shutdown-done but not for the backend
       disappearing.

Pause and unpause will now terminate if the backend is destroyed, treating
this the same way they currently treat shutdown-done.

This issue was exposed by the removal of a higher-level per-VM lock as part
of the checkpoint work.

Signed-off-by: David Scott <63c9eb0ea83039690fefa11afe17873ba8278a56@eu.citrix.com>

jjd27/xen-api,euanh/xen-api,koushikcgit/xen-api,ravippandey/xen-api,guard163/xen-api,vasilenkomike/xen-api,robertbreker/xen-api,koushikcgit/xen-api,huizh/xen-api,vasilenkomike/xen-api,ravippandey/xen-api,djs55/xen-api,anoobs/xen-api,guard163/xen-api,rafalmiel/xen-api,jjd27/xen-api,robertbreker/xen-api,srowe/xen-api,koushikcgit/xen-api,euanh/xen-api,robertbreker/xen-api,simonjbeaumont/xen-api,srowe/xen-api,simonjbeaumont/xen-api,vasilenkomike/xen-api,huizh/xen-api,thomassa/xen-api,huizh/xen-api,cheng-z/xen-api,koushikcgit/xen-api,Frezzle/xen-api,jjd27/xen-api,agimofcarmen/xen-api,srowe/xen-api,djs55/xen-api,thomassa/xen-api,ravippandey/xen-api,Frezzle/xen-api,rafalmiel/xen-api,djs55/xen-api,cheng--zhang/xen-api,cheng--zhang/xen-api,anoobs/xen-api,ravippandey/xen-api,rafalmiel/xen-api,cheng--zhang/xen-api,euanh/xen-api,srowe/xen-api,Frezzle/xen-api,simonjbeaumont/xen-api,vasilenkomike/xen-api,jjd27/xen-api,djs55/xen-api,simonjbeaumont/xen-api,jjd27/xen-api,huizh/xen-api,cheng-z/xen-api,anoobs/xen-api,simonjbeaumont/xen-api,cheng-z/xen-api,salvocambria/xen-api,agimofcarmen/xen-api,thomassa/xen-api,djs55/xen-api,anoobs/xen-api,guard163/xen-api,salvocambria/xen-api,vasilenkomike/xen-api,cheng-z/xen-api,euanh/xen-api,salvocambria/xen-api,guard163/xen-api,salvocambria/xen-api,rafalmiel/xen-api,anoobs/xen-api,agimofcarmen/xen-api,cheng-z/xen-api,agimofcarmen/xen-api,robertbreker/xen-api,guard163/xen-api,agimofcarmen/xen-api,srowe/xen-api,euanh/xen-api,anoobs/xen-api,vasilenkomike/xen-api,jjd27/xen-api,thomassa/xen-api,djs55/xen-api,cheng--zhang/xen-api,Frezzle/xen-api,salvocambria/xen-api,agimofcarmen/xen-api,Frezzle/xen-api,thomassa/xen-api,cheng--zhang/xen-api,ravippandey/xen-api,huizh/xen-api,rafalmiel/xen-api,cheng-z/xen-api,rafalmiel/xen-api,huizh/xen-api,salvocambria/xen-api,cheng--zhang/xen-api,simonjbeaumont/xen-api,euanh/xen-api,thomassa/xen-api,cheng--zhang/xen-api,guard163/xen-api,robertbreker/xen-api,cheng-z/xen-api,ravippandey/xen-api,robertbreker/xen-api,koushikcgit/xen-api,koushikcgit/xen-api