Refactor Werkzeug requirement into flask

This is a PR for discussion is a rewrite of the code base that removes Werkzeug and replaces the server code with a Flask implementation - see issue #38 .
We'll need it sooner or later when I add the Beacon.  It's a library that installs smoothly setup.py so I'd like to keep it.  All this backing out of code and adding it to other PRs is quite time consuming and there's a lot that still needs to get done.