added some additional functions for dealing with chunks - needed for mitmproxy streaming capability
refactor response length handling
Merge branch 'master' into stream

Conflicts:
	netlib/http.py
Merge pull request #42 from mitmproxy/stream

Stream