Improve `AbstractMessage#toDomDocument` for XML content.

This changes utilizes the value of the Content-Type header to
determine what the best method is for loading the content into the
DOMDocument.
Properly parse the content type header to extract the format.
Merge remote-tracking branch 'marijn/feature/xml-aware-to-dom-document'
cleaned up xml detection