[libvirt PATCH v3 07/13] qemu, hypervisor: refactor some cgroup mgmt methods