[libvirt PATCH 12/14] qemu: Move utility functions close together