Fix DOMDiff JSHint warnings and move root node equality check out of recursive worker

No changes in parserTests.

Change-Id: I8543850f46c73c1f02991aa75a30ea3e5292b1dc
Merge "Fix DOMDiff JSHint warnings and move root node equality check out of recursive worker"