[PATCH 5/7] qemuMigrationCapsToJSON: Refactor variable cleanup