[libvirt PATCH v4 1/7] qemu, hypervisor: refactor some cgroup mgmt methods