Make flask's debug mode configurable.

We don't want to be using this in production.
Merge pull request #216 from zenhack/debug-cfg

Make flask's debug mode configurable.