Add a config setting to log to a file

This logs all exception & stack traces by default.

If you want to log a warning, you can do something like:

```python
app.logger.warn("Something is bad!")
```

and it will show up in either the log file or the console depending on settings.
We have to treat logging differently because Flask treats it differently. In debug mode, it logs everything on stderr. In non-debug mode, it's quiet. So I turn on logging for non-debug mode.

If we wanted the same config, I'd have to figure out how to disable Flask's default logging behavior in debug mode, or we'd have to be cool with double-logging everything.