[PATCH v2 1/8] qemu: Move domain-related functions to qemu_domain