set correct content type on xml requests

fixes #1514 and #1516
The problem shows when you're going through Apache, which will set it to `text/plain` unless you specify something here. This problem doesn't show when running in front of tomcat directly. So... no, it doesn't show easily.

The full story was that one request previously had set `defaultHeaders` in one Ajax request and this caused a global variable to be set, causing all Ajax requests to have `application/xml` default header. This happened in commit 1088e4a82f45569ed8ec7b16c55bb74b9823fa03 and I think it's pretty difficult to understand there was actually a global variable being set there.

Another suggested solution was to have `application/xml` set globally, but that's a bit ugly, isn't it?