qemu: snapshot: Refactor snapshot rollback on failure
qemu: snapshot: Refactor snapshot rollback on failure

The code at first changed the definition and then rolled it back in case
of failure. This was ridiculous. Refactor the code so that the image in
the definition is changed only when the snapshot is successful.

The refactor will also simplify further fix of image locking when doing
snapshots.

VenkatDatta/libvirt,olafhering/libvirt,jardasgit/libvirt,andreabolognani/libvirt,jardasgit/libvirt,jardasgit/libvirt,datto/libvirt,taget/libvirt,olafhering/libvirt,crobinso/libvirt,taget/libvirt,andreabolognani/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,eskultety/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,libvirt/libvirt,libvirt/libvirt,zippy2/libvirt,andreabolognani/libvirt,eskultety/libvirt,datto/libvirt,VenkatDatta/libvirt,eskultety/libvirt,andreabolognani/libvirt,jfehlig/libvirt,crobinso/libvirt,VenkatDatta/libvirt,jfehlig/libvirt,taget/libvirt,eskultety/libvirt,nertpinx/libvirt,zippy2/libvirt,taget/libvirt,zippy2/libvirt,taget/libvirt,andreabolognani/libvirt,nertpinx/libvirt,datto/libvirt,jardasgit/libvirt,datto/libvirt,crobinso/libvirt,datto/libvirt,fabianfreyer/libvirt,olafhering/libvirt,nertpinx/libvirt,nertpinx/libvirt,crobinso/libvirt,libvirt/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,VenkatDatta/libvirt,VenkatDatta/libvirt,fabianfreyer/libvirt,jfehlig/libvirt,eskultety/libvirt,olafhering/libvirt,zippy2/libvirt,libvirt/libvirt