[PATCH 16/20] qemuMigrationCookieNBDXMLParse: Refactor memory handling