Add a global 'readonly' mode (closes #365.)

This works by looking for a file which, if it exists, prevents the
user from logging in. This should prevent changing things in the DB.

The location of the READONLY file is by default the app CWD but is
overridden in the prod config to be the app install dir. The existence
of this file can be toggled via the Fabric script.