qemu: Don't duplicate errors when settings stats period
qemu: Don't duplicate errors when settings stats period

In order not to leave old error messages set, this patch refactors the
code so the error is reported only when acted upon.  The only such place
already rewrites any error, so cleaning up all the error reporting in
qemuMonitorSetMemoryStatsPeriod() is enough.

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

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