Add ability to load configuration from the database

This is to support the dockerisation of the server.

Will also implement a full environment variables system in future.
a throw statement inside a finally block will break the logical progression through the try-catch-finally - we will hide the original exception if this one is thrown.