Put logic for loading jobs in one place.
Added datetime handler for json.dumps.
Make sure we close database connection after responding to web requests.
Added some query API configuration variables.
Tidied up generated update SQL for geometrical mean.
Added some failing tests for geometrical mean situations that need to be looked at.