Added nock and sinon libraries for testing.

* nock provides http(s) mocking, while sinon can mock/spy/stub js objects.
Removed custom mock implementations in favour of third party mock libs.
Rewrote tests to use new mocking frameworks.
Merge branch 'httpMock'.

* Added third-party mocking frameworks for http(s) and js objects. This allows for testing without having the rely on having a network connection.
* Updated tests to use the the new frameworks.
* Removed custom made "mock" things.
* Re-added test for issues, using the nock mock framework to fake http calls.