Introduced an instance variable for storing foreign key table map.
This is a preparation to get rid of the JDBC calls in Record.foreignKeyTableMap
Started storing foreign keys as an instance variable to avoid looking it up again.

 Everything looks very confusing now though
Removed redundant code from Record.foreignKeyTableMap