The problem was with python > 2.3 which stores part of the
headers in unredirected_hdrs.
Furthermore, we simplify the code to use httplib directly.
fix issue473
uses keepalive module from urlgrabber package. tested against "hg serve",
cgi server, and through http proxy. used ethereal to verify that only
one tcp connection used during entire "hg pull" sequence.
if server supports keepalive, this makes latency of "hg pull" much lower.