Bug 858402: added addEventListener and removeEventListener methods to sdk/net/xhr and used a load event listener to check if the request cleaned up itself, instead of using a setTimout.

Also cleaned up the test-xhr.js file to use the new test framework.

The setTimeout was either not firing soon enough or it was firing too soon.
Merge pull request #965 from erikvold/858402

Bug 858402:  Intermittent tests/test-xhr.testLocalXhr | Timed out r=@Gozala