[PATCH 14/20] qemuMigrationCookieXMLFormat: Refactor memory handling