XHR: Port all "native" logic to HTML5 runtime.

Simplify a logic and save some bits.
Tests: Timeout async tests if they are idle for more than 10 secs.