[libvirt PATCH v2 2/5] conf: refactor virDomainResourceDefParse