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