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`.