In some versions of python (including 2.5 and 3.2 but not 2.6 or 2.7),
urlsplit results use __slots__ and therefore don't allow artibrary attributes
to be set.
Also move the storing of the parsed hostname above hostname_mapping,
since the cert should be checked against the requested url, not the remapped
one.
Closes#448.