[libvirt] [PATCHv2 9/4] virsh: declare more common functions