resteasy-jsapi: Clear XHR handler after success.

The problem I encoutered that the onreadystatechange handler is called multiple
times on iOS 6. I can try to provide a simplified scenario but the idea is that
in the ajax callback I add two images to the HTML page. This caused the handler
to be called three times.

Some (especially older) browsers leak memory due to the cyclic reference
between the XMLHttpRequest object and the callback. This
[article](http://nullprogram.com/blog/2013/02/08/) dicusses this problem.