Fix migrations and cleanup circular import problems

This moves the warehouse.application:Warehouse.metadata global into it's own file to work around circular import problems. This allows cleaning up some import code and allows using regular ``import`` statements for models. Additionally it imports the tables modules in order to trigger the registration of the tables defined in them with SQLAlchemy.