[libvirt] [PATCHv4 11/18] conf: Refactor code for matching existing resctrls