remote: fix lock ordering mistake in event registration
remote: fix lock ordering mistake in event registration

If the event (un)registration methods are invoked while no connection is
open, they jump to a cleanup block which unlocks a mutex which is not
currently locked.

Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>
Reviewed-by: Andrea Bolognani <3ada0bee826c753786fdbba72243dfba997094cf@redhat.com>
Signed-off-by: Daniel P. Berrangé <bb938cf255e055ff3507f2627d214e8e62118fcf@redhat.com>

nertpinx/libvirt,libvirt/libvirt,crobinso/libvirt,jfehlig/libvirt,andreabolognani/libvirt,jfehlig/libvirt,libvirt/libvirt,nertpinx/libvirt,andreabolognani/libvirt,jfehlig/libvirt,olafhering/libvirt,libvirt/libvirt,zippy2/libvirt,andreabolognani/libvirt,zippy2/libvirt,crobinso/libvirt,olafhering/libvirt,jardasgit/libvirt,olafhering/libvirt,crobinso/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,nertpinx/libvirt,zippy2/libvirt,andreabolognani/libvirt,libvirt/libvirt,fabianfreyer/libvirt,nertpinx/libvirt,olafhering/libvirt,jardasgit/libvirt,zippy2/libvirt,jardasgit/libvirt,jardasgit/libvirt,jfehlig/libvirt,crobinso/libvirt,fabianfreyer/libvirt,fabianfreyer/libvirt,nertpinx/libvirt