Explicitly use sync versions of cookie functions
This allows regular `tough-cookie' jars to be passed on directly to `request`.
Rearrange requires to prepare for fixing debug code

If we load request.js right at the top of index.js, this creates a
circular dependency (index.js -> request.js -> lib/debug.js and back
again).

If index.js has not exported request and request.debug by the time
request.js is loaded, then lib/debug.js will never see them.  So, we
need to ensure that request.debug is set before requiring lib/debug.js.
Avoid lots of lookups to process.env

See b85bf633 for details - process.env results in a synchronous syscall
to `getenv()` and this was happening at least a few times per request.
Expand debugging tests
Document debug options
Fix readme headings

It doesn't make sense to have the **Custom HTTP headers** and
**request(options, callback)** sections *under* the **OAuth Signing**
section.
souped up nodei.co badge
Merge pull request #1034 from nylen/fix-readme-headings

Fix readme headings
Merge pull request #1033 from nylen/debug-fixes

Improve and document debug options
initial cleanup of the index.js
additional tidying up
fix bug, test didn't catch this though
Correcting mistake from rebase
Merge pull request #1021 from seanstrom/support/refactor-indexjs

Support/refactor indexjs
extract out helper functions to a helper file
propagate datastream errors

zlib can fail
Merge pull request #1039 from seanstrom/support/extract-helper-functions

extract out helper functions to a helper file
Add: basic test-gzip-errors
Add: Backward compatibility
Retain a `._jar` self-reference (to avoid breaking any hacks like #975 )
Aws is now possible using a proxy

The path of a Request will contain the fully qualified domain name
when using a proxy.  So it is not usable to calculate the amazon
authorization header of.