virNetSocket: Fix @watch corner case
virNetSocket: Fix @watch corner case

Although highly unlikely, nobody says that virEventAddHandle()
can't return 0 as a handle to socket callback. It can't happen
with our default implementation since all watches will have value
1 or greater, but users can register their own callback functions
(which can re-use unused watch IDs for instance). If this is the
case, weird things may happen.

Also, there's a little bug I'm fixing too, upon
virNetSocketRemoveIOCallback(), the variable holding callback ID
was not reset. Therefore calling AddIOCallback() once again would
fail. Not that we are doing it right now, but we might.

Signed-off-by: Michal Privoznik <83d82aaba2eed257f4814b0c239c260c4caaadf0@redhat.com>

jfehlig/libvirt,fabianfreyer/libvirt,jardasgit/libvirt,olafhering/libvirt,VenkatDatta/libvirt,jardasgit/libvirt,nertpinx/libvirt,datto/libvirt,libvirt/libvirt,taget/libvirt,eskultety/libvirt,libvirt/libvirt,datto/libvirt,rlaager/libvirt,eskultety/libvirt,agx/libvirt,olafhering/libvirt,fabianfreyer/libvirt,libvirt/libvirt,fabianfreyer/libvirt,andreabolognani/libvirt,andreabolognani/libvirt,jardasgit/libvirt,rlaager/libvirt,andreabolognani/libvirt,olafhering/libvirt,zippy2/libvirt,zippy2/libvirt,crobinso/libvirt,jfehlig/libvirt,rlaager/libvirt,jfehlig/libvirt,eskultety/libvirt,taget/libvirt,taget/libvirt,nertpinx/libvirt,agx/libvirt,agx/libvirt,VenkatDatta/libvirt,VenkatDatta/libvirt,nertpinx/libvirt,eskultety/libvirt,andreabolognani/libvirt,zippy2/libvirt,fabianfreyer/libvirt,taget/libvirt,jardasgit/libvirt,crobinso/libvirt,andreabolognani/libvirt,crobinso/libvirt,agx/libvirt,jardasgit/libvirt,fabianfreyer/libvirt,VenkatDatta/libvirt,taget/libvirt,datto/libvirt,datto/libvirt,eskultety/libvirt,zippy2/libvirt,olafhering/libvirt,libvirt/libvirt,nertpinx/libvirt,nertpinx/libvirt,jfehlig/libvirt,crobinso/libvirt,VenkatDatta/libvirt,rlaager/libvirt,rlaager/libvirt,datto/libvirt,agx/libvirt