Catch and ignore EINVAL errors from setsockopt.

This seems to happen a lot in benchmark runs when sockets are closed
after a request.
Rewrite HTTPHeaders normalization to limit the growth of the cache.

Reorganize the code into a dict subclass for speed: cache hits are now
just a dict lookup, with no python function call.  (this saves about 1%
on demos/benchmark/benchmark.py on cpython 2.7)

Remove the regex-based fast path, which has not had any real impact since
we added the dict cache.