Safer DWR callback method introduced

We discovered a bug in DWR, still unresolved even on the project SVN, about
the error callback function being called when navigating away from a page
while an AJAX call is in progress.

This does not always happen, but it has been reproduced reliably on Firefox
28 and Chromium 33 on Linux and Firefox 28 on Mac OS X right after Tomcat
is restarted and especially in automated tests. Currently an error popup
appears briefly.

This commit adds a workaround by detecting page unloads and avoiding
error handler calls if the specific error is detected. It can be removed
once it is fixed by DWR upstream.
dwr.xml file reformatted