Flask backend port

I ported the Apache-based backend to [Flask](http://flask.pocoo.org/) to make it easier to run. Run `python app.py` to start the debug server on port 5000.