Add maintenance mode

This takes care of #579 

It adds the redis "maintenance" key as in american gut, as well as click commands to set and unset the maintenance mode. It also auto-sets maintenance mode if login screws up because the database is down.
It's a good thought, but I'm not sure this is the behavior we actually want.  IMHO, if logins are broken, then maintenance mode should be set *without* an expiration, since making things work again will be something that one or more devs will have to do, and they can turn off maintenance mode when they are done.