Add a test for digest auth in curl_httpclient.

I wrote this to test for a file descriptor bug, but can't reproduce it
on my system.
Use remove and add instead of update_handler in curl_httpclient.

Curl sometimes fails to tell us that it has closed a socket
and reopened a new one with the same file descriptor, leading
to problems in some IOLoops.  This should fix the recurring problem
of update_handler errors in various less-common use cases.

Closes #801.
Closes #538.