Added onloadend() callback for XHRs

I didn't look into this too carefully but in my application I wanted the onloadend callback for testing. With respect to Chrome, Safari, and Firefox, the onloadend callback is executed after the final onreadystatechange.