Namespaced exceptions

This begins the process of updating our code to use different types of exceptions instead of always the generic "Exception".

In particular, the database class will now throw Database exceptions. There are (currently) three types of exceptions which may be thrown.

1. DatabaseExceptions, when there is a database error
2. ConfigurationExceptions, when there is an error with the configuration
3. LorisExceptions (of which both of the above derive), for any exception from Loris that does not fit into either of the above.