[libvirt] [PATCHv2 0/7] Fix checking of NULL monitor and clean up code