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