Add attachListener and setGlobal APIs
Add attachListener and setGlobal APIs

The listener helps with debugging since some errors are emmitted to the “error” event.

setGlobal allows us to replace built-in APIs from jsdom, such as using a local version of XMLHttpRequest.

thrashr888/node-angularcontext,apparentlymart/node-angularcontext