Add extensive tests for error conditions and Deferred cancelation effects
for the httpclient.