qemu: snapshot: Unify conditions checking whether snapshot needs to be taken
qemu: snapshot: Unify conditions checking whether snapshot needs to be taken

In the cleanup path we already checked whether a snapshot needed to be
taken by looking into the collected data. Use the same approach when
creating the snapshot command data and when committing the changes to the
domain definition.

Signed-off-by: Peter Krempa <2cf5c04c61aa466e4a47bfedc747d17279c72ffc@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

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