Date and random plugins are responsible for reversing their logs on replay
Redirect phantomjs stdout to file
Capture and replay XHRs

Use jsdom to simulate XHR events. Log XHR interface at capture time and recreate
at replay time. Log the result of all method calls and property accesses and
replay.

The `xhr` plugin uses the following log structure:

```json
"xhr": {
  /*
  captured XMLHttpRequest interface
  */
  "iface": {
    "instance": {
      "methods": [/* instance methods present at capture time */],
      "properties": [/* instance properties present at capture time */]
    },
    "prototype": {
      "methods": [/* prototype methods present at capture time */],
      "properties": [/* prototype properties present at capture time */]
    }
  },
  /*
  instance records with captured results of method calls and property accesses
  */
  "instances": [{
      "id": 0,
      "readyState": [{
        "type": "result",
        "value": 0
      }],
      "send": [{
        "type": "error",
        "value": {
          "message": "INVALID_STATE_ERROR: DOM Exception 11",
          "code": 11,
          "name": "INVALID_STATE_ERROR"
        }
      }]
    },
    /* ... */
  ]
}
```