System module conversion to Doctrine DBAL

Adds portable schema support, eliminates all use of legacy database from within modules/system itself. The system module now uses portable schema for its own installation, so core tables are now created in a driver agnostic way.