sslutil: use raw strings for exception reason compare
Otherwise we attempt to compare a bytes to a str on Python 3
and it always fails.
Differential Revision: https://phab.mercurial-scm.org/D5721
keepalive: track ready state with a bool
This code may have been written before Python had a bool type.
Differential Revision: https://phab.mercurial-scm.org/D5719
keepalive: use collections.defaultdict for host map
Cleaning up the code as part of debugging Python 3 issues.
Differential Revision: https://phab.mercurial-scm.org/D5718