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.
I think that's fine. In this case it will throw and get caught at the level above which kills the process anyway.