Attach events to request.upload instead of directly to the XMLHttpRequest.

Fixes the progress bar issue.