Move Layout Tree Construction code into Element::rebuildLayoutTree()

This patch uses the two dirty bits (NeedsReattachLayoutTree and
ChildNeedsReattachLayoutTree) on Node and adds the relevant
getters/setters for them.

It makes rebuildLayoutTree() public to be accessed in Document.cpp.

It also moves reattachWhitespaceSiblingsIfNeeded() to rebuildLayoutTree() and
uses dirtyBits to call either reattachLayoutTree() on node itself or call
rebuildLayoutTree() on children nodes.

Also added some comments explaining some design decisions. Will be removed
upon completion of separation.

BUG=595137

Committed: https://crrev.com/09b7a8cf0647abca732b3718987a629d12a67fee
Review-Url: https://codereview.chromium.org/2398293003
Cr-Original-Commit-Position: refs/heads/master@{#426353}
Cr-Commit-Position: refs/heads/master@{#427612}
9 files changed