Initial work on HTTP client (#217).

Far from done. Lots of missing functionality, no configurability and internals are a mess.