tests: glib-ify vircaps2xmltest
tests: glib-ify vircaps2xmltest

Ideally, turning pointers into g_auto* would be done in one step
and dropping cleanup label and unused @ret variable in second
step, but since this is a test we don't care that much, do we?

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Martin Kletzander <e82f23e74d43760279ebcc505dac4ae70d5627d0@redhat.com>

nertpinx/libvirt,jfehlig/libvirt,libvirt/libvirt,crobinso/libvirt,olafhering/libvirt,nertpinx/libvirt,crobinso/libvirt,libvirt/libvirt,zippy2/libvirt,nertpinx/libvirt,olafhering/libvirt,crobinso/libvirt,libvirt/libvirt,zippy2/libvirt,nertpinx/libvirt,olafhering/libvirt,zippy2/libvirt,jfehlig/libvirt,nertpinx/libvirt,crobinso/libvirt,libvirt/libvirt,zippy2/libvirt,jfehlig/libvirt,jfehlig/libvirt,olafhering/libvirt