qemu: monitor: json: Refactor error code class checker
qemu: monitor: json: Refactor error code class checker

Split out the function that checks the actual error class string into a
separate helper as it will be useful later and refactor
qemuMonitorJSONHasError to return bool type and remove few useless
checks.

Basically virJSONValueObjectHasKey are useless here since the next call
to virJSONValueObjectGet is checking the return value again (which can't
fail at that point). By removing the first check we save a function
call.

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