Fixed bug in getTables4Db. Was closing the connection. Shouldn't do this! Add method getAllIds4KeyAndTables, moved from DataDistribution. It makes more sense to have it here.