[libvirt] [PATCHv5 03/19] util: Refactor code for adding PID to the resource group