[libvirt PATCH 4/6] tests: qemu: use g_autoptr where possible