virthread: Make sure virOnce() returns -1 on error
virthread: Make sure virOnce() returns -1 on error

Since its introduction in v0.9.1~65 the virOnce() was expected to
follow the usual retval logic (0 for success, a negative number
for failure). However, that was never the case.

On the other hand, looking into glibc and musl the pthread_once()
never returns anything other than zero (uclibc-ng seems to not
implement pthread_once()), therefore we never really hit any
problem. But for code cleanliness (and to match POSIX
documentation), let's change to code so that our retval logic is
honoured.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>
Reviewed-by: Ján Tomko <4cab11cfb98d3c937327354a78eb07dbb6ee2bc6@redhat.com>

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