refactor ProxyHandler, remove duplicate code
add comments
serverconnect hook: Set sc.request

The serverconnect hook script might need to examine the incoming request
in order to set up the server connection.

Example use: bind to a distinct source IPv6 address for each client.
handle a hook changing connection parameters
Reconnect if the server-connect hook needs the request to decide what to do
Merge pull request #189 from mitmproxy/refactor_proxyhandler

Refactor ProxyHandler
add @concurrent decorator for inline scripts, fixes #176
fix script path error in tests
merge smurfix/fix2, add serverconnect hook docs, adjust tests
ignore web gui specific paths that won't get cleaned up when changing branches
merge master
unignore integrate_honeyproxy branch specific files