events: fix non-lifecycle domain event handling
events: fix non-lifecycle domain event handling

This is mostly a partial rip-off of #80. So, all credits to
@kunteynir.

First, we ensure we call `virConnectDomainEventRegisterAny_cgo()` with
the right event ID, instead of `C.VIR_DOMAIN_EVENT_ID_LIFECYCLE`.

Fix #98.

Second, when a Go function is exported, `string` becomes a `GoString`
which is not compatible with `char *`. Therefore, we use `*C.char` in
the signature of those functions instead of `string` and we convert back
to `GoString` inside the callback. This could have been caught at
compile time if we were able to use exported definition in `cfuncs.go`,
but this doesn't seem possible (see #87).

alexzorin/libvirt-go,rgbkrk/libvirt-go,libvirt/libvirt-go,Pryz/libvirt-go,libvirt/libvirt-go,rgbkrk/libvirt-go,rgbkrk/libvirt-go,Pryz/libvirt-go,alexzorin/libvirt-go,Pryz/libvirt-go,libvirt/libvirt-go,libvirt/libvirt-go