[libvirt] [PATCH 2/7] qemu: Split out code to save domain memory to allow reuse