Fix xhr onreadystatechange firing multiple times with state 4.

I noticed that XHRs were firing with state 4 multiple times.  This doesn't affect jQuery, but it does cause problems with [superagent](https://github.com/visionmedia/superagent) and anybody coding with XHRs manually.

The root of the issue was that _stateChanged gets called with the correct states, but the @onreadystatechange listener is queued to run later, and when it finally does run the state has been changed.

I cleaned up some of the listener logic, wrapped the final _stateChange in an ``enqueue``, and added a test for this scenario.