Move onreadystatechange reset test to other test case
Enable success callback for local requests
Check current URL to decide if request is local
Test calling noop and confirm undefined return value
Increase testability of tddjs.isLocal
Handle case when location.protocol is not a string
Require isLocal to throw exception instead of return false

when supplied with a location without a valid prototype attribute.
Refactor out code duplication