Add tests for $.ajax()

This uses a modified version of node-xmlhttprequest plus a faked
node.js http module implementation to enable fake XMLHttpRequests
to be intercepted and tested.

One shortcoming at the moment is that it doesn't test the
data written during the request, only the headers sent.