XHR test bug fixes

I've reviewed about half of the test suite, the spec has changed in various ways and bug fixes & alignment is required