Add support for CORS / XHR

This is ready to be looked over now.
this fails jscs. After looking at the travis config, it appears travis only runs grunt test. would you mind updating the .travis.yml file?