Added HTTP proxy support
Some refactoring of proxy code
Further refactoring of proxy code
Merge branch 'http-proxy-feature' of https://github.com/nurupo/InsertProjectNameHere
Fixed bug with auto tests and cleaned up the code a bit.
Make it possible to port clients to the new api by just replacing
proxy_enabled with proxy_type.