Add DOM diff and rework selective serializer

* Split out DOMDiff class, implemented basic DOM-based diffing that compares
  the original DOM for the revision with the DOM passed in for serialization.
  This will make Parsoid independent of change markers, so that selective
  serialization can be used with arbitrary clients. Since change markers are
  currently pretty coarse (never on inline elements for example), it should
  also improve selser range precision with the VE.

* DOM diff should finally fix the long-standing VE deletion bug (FIXME: bug
  number?)

* Add data-parsoid-diff information to the DOM that records after which
  revision a given element was changed last and the nature of the change. This
  information could in the future be used for an efficient 'git blame'
  implementation.

* Add change markers in the selective serializer based on the diff
  annotations.

* Killed separate SelserState object

* Prepared for simplified WTS callback scheme without newline buffering:
  Separate callback flags for unmodified source, separators and modified DOM
  subtrees. Assumption is that separators are passed in a single call from a
  DOM-based serializeSeparator(nodeA, nodeB, state) method in WTS or the like.

* Moved all page-related information into an env.page object (name, id, src,
  dom).

* Added a bunch of related utility methods in DOMUtils.

* There are still some regressions in plain selser mode (6006 down from 6820).
  Many seem to be related to trailing newlines.

* With trailing newline stripping in selser mode (part of this patch), selser
  test results are up to 7837

TODO:

- Better integrate with WTS / modify it to emit *all* (not just DSR gap based)
  separators separately
- Refine and test DOM diff algorithm
- get test results back up to the old state
- clean up

Change-Id: I69806740329a2094ab854577c3f20c7adc4db237