xhr: Wrote tests for xhr.js

- [ ] @davestein
Instead of three separate vars,
```js
var meta = {
  type: 'POST',
  url: 'foo/bar',
  data: {
    foo: 'bar'
  }
};
```

Then subsequently, call `xhr(meta)`