Implement style invalidation tree walk for targeted style recalc upon class change.

"Style invalidation" is defined as the process of deciding
whether elements need style recalculation, based on the
input of a particular DOM mutation.

When the class changes for an element, a style invalidation
bit is recorded on it. Just before style is subsequently
recomputed on the document, walks the tree to determine
which elements have style invalidation needed, and for those
elements, calls setNeedsStyleRecalc() on the elements of the
element subtree that need it. If we can't figure out which
elements exactly need style recalculation, we fall back on
the whole subtree.

All layout tests pass with and without the runtime flag for
this feature.

BUG=335247

Review URL: https://codereview.chromium.org/143873016

git-svn-id: svn://svn.chromium.org/blink/trunk@166247 bbb929c8-8fbe-4397-9dbb-9b2b20218538