[libvirt] [PATCH 1/3] event-test: Use goto cleanup instead of if else jungle