tree: Introduce xmlUnlinkNodeInternal xmlUnlinkNode also removes references to DTD nodes which shouldn't be done when moving nodes within a document. Introduce a new function xmlUnlinkNodeInternal which only unlinks a node from the tree. Remove references to DTD nodes in xmlNodeSetDoc. Note that moving element and attribute declarations to another document will still leave references in the source document.