Porting to flask

Switching from tornado to flask. Tornado is kind of a pain to write
tests for and this has to sit behind Apache anyways, so the async
benefits are dubious.