CA-164233: Rework snapshot-revert behaviour
CA-164233: Rework snapshot-revert behaviour

If a VM's disk has been destroyed since a snapshot was taken, when we
revert to that snapshot the destroyed disk will not be in the old disk
-> new disk map, so the destroyed disks snapshots will not be updated to
point at the new cloned disk.

Instead, use the snapshot_of field of the snapshot which has been cloned
to find all the snapshots in the same tree, and then modify all those
snapshots to be snapshot_of the new cloned disk.

Signed-off-by: John Else <37b74501daa612e48fea94f9846ed4ddeb6a8f07@citrix.com>

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