Further improved httpserver

* Improved httpserver code
* Improved getwork server code
* Improved stratum server code.