This method acts as if the document was going through a save and load cycle,
putting the document in a "normal" form. As a consequence, this method
updates the replacement tree of
EntityReference nodes and normalizes
nodes, as defined in the method Node.normalize().
Copyright Lodovico Giaretta 2016 --