XWIKI-11050: Do not fail the UI when there's a problem rendering the document's content
* Also fix getDefaultEditMode() which shouldn't fail if the doc fails to be parsed.