Fixed client request related issues

Fixed a major issue with out-of-order recording of requests exposed on CI platforms which have different timings. There is a unit test interfering with other unit tests as it doesn't wait for its request to finish before finishing the test *but* it is kind of the whole point of the test so rather than fixing it, I changed nock to work around it. This was an older issue that already lead to a demise of one PR.

Fixed compatibility issues with other libraries overriding ClientRequest (e.g. xhr2)
Unified http/https request overriding
Fixed dangling ClientRequest overriding (wasn’t being restored on restore() and was being overridden on each activate())
Added jshint configuration and did some cleaning based on it
Added tests for activation, restoration, https recording, some common functions
Added more info to “No match for request” exception
Added debug module for debug tracing
Fixed some minor issues