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