Add global sqlalchemy metadata, and handle table creating in pluginmanager rather than in plugins.

Also update dbtest to use this new method