Make bot.py behave like a daemon

This includes a number of changes to prevent printing to stdout and
enable using daemonContext so that we can run bot.py as a daemon.