Starting 1.1
Merge pull request #153 from detro/master

Enhance HttpFilters to provide deeper insight into what's happening on the Connection level
Applied standard auto-formatting to changes from PR #153
Stripping HOST from Connect even in transparent mode.

Some websites (i.e. "nytimes.com") seem to have issues loading when using
LittleProxy in transparent mode.

The reason is down to the "URI" header containing the full URL (instead of just
the path) when using in Transparent mode.
While most webservers online are OK with that, some old servers seem to respond
with malformed "Location" headers when the Proxy is behaving in
"transparent mode" and it doesn't strip the Host from the URI.

So we are going to always strip the Host from the URI (transparent or not) and
ensure the Host header is present (added if missing).

This should ensure preservetion of correct behaviour with old clients and
old servers.
Gitignore littleproxy_cert file
Shutdown Hook switch + UncaughtExceptionHandler.

So far, LittleProxy registered 2 important things
automatically, relying on the assumption that only
1, or just few, Proxy instances would be created
with a process. And that the end of the hosting
process would mean also the end of LittleProxy
instances.

This was translated with “hardcoded” shutdown hooks
registered on the Runtime, as well as UncaughtExceptionHander
for the Proxy Thread pool.

The issue with those are 1) making it impossible
for the host project to handle the lifecycle
fully 2) a memory leak building over time, when
multiple instances of LittleProxy got created and
destroyed in the lifetime of the host application.

Now it’s possible to control this aspect.
Adding byte send/receive hooks to HttpFilters.