Heroku Flask server

Use Flask instead of CGI for the server.
This reduces complexity and makes it possible to run it on Heroku with ease.

`Procfile`, `runtime.txt` and `requirements.txt` are used by Heroku.