Refactored server module to use Flask.

https://bugzilla.mozilla.org/show_bug.cgi?id=1004454