Provide a method that clone a DOMDocument in order to provide a temporary fix for the function createHtmlDocumentWithHtml.

Indeed, innerHTML does not allow us to have a document with some invalid HTML code,
that could belong to an iteration's template for example.
Such as: <body><tr></tr></body> --> <body></body>

Plus, it's a little bit faster.

No problems noticed.