Introduce a TableMetadata object to hold information on foreign keys and such that is expensive to obtain and used by several aspects of the export.