Make sure to close the transactions after repack_one_table

If we exit early (e.g. checking the triggers) repack_cleanup() is not called
but we must close the transactions anyway.