De-duplicate code into virObjectEventStateCleanupTimer()
De-duplicate code into virObjectEventStateCleanupTimer()

There is a repeating pattern of code that removes the timer if it's not
needed.  So let's move it to a new function.  We'll also use it later.

Signed-off-by: Martin Kletzander <e82f23e74d43760279ebcc505dac4ae70d5627d0@redhat.com>

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