Fixed some ClientRequest overriding related issues

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
Fixed out-of-order recording of pending requests
The problem was exposed through unit test 'checks if callback is specified' interfering with other tests
Merge branch 'fixed-ClientRequest-related-issues'