Rolled back before multithreaded approach to be able to be used on Google App Engine. Also added the ability to override the HTTPClient.

TODO: Go through all commits after this and merge in all the changes.