Database manager

@isupeene Working Database manager that is tested. Still needs contracts.

Note: Need to run database_clear.sql and then database_setup.sql on our DB before submitting.
I guess this whole function should be in the VictoryConditions module - it's too late to worry about stuff like that, though.