[libvirt] [PATCH 3/6] snapshot: refactor some qemu code