Add compareDocumentPosition (fixes #1794) to Node