Safe cleanup in makeAjaxRequest error handler

Previously `request.onreadystatechange` was assigned an empty function
on success but null on failures, which breaks in IE (see
http://jsbin.com/ezozax/6/).

This patch simply mimics the success behaviour in the cleanup function

Closes #143
Merge pull request #144 from acdha/143-xhr-error-handling

Safe cleanup in makeAjaxRequest error handler