Keep separate style sharing lists for different depths of the tree

Since elements can only ever share with other elements at the exact same
depth in the tree we should keep an LRU for each depth. This lets us
prune the possible candidate elements so we have fewer elements to consider
in the common case.

In particular it means that as we walk down the tree in recalcStyle we
aren't filling the LRU with elements that could never share with the dirty
elements since they're at different depths.

I picked 32 as the max depth after looking at Gmail, Facebook, Twitter and many
other apps and deciding that for some strange reason most DOM trees are about
32 elements deep.

I picked 15 as the LRU size after looking at Wikipedia and the HTML5 full render
perf test. The HTML5 full render test didn't seem to change much based on what
numbers I picked. Wikipedia Cats (http://en.wikipedia.org/wiki/Cat) shares slightly
less with 71% of candidates find a match instead of 72%, reducing the global
sharing percentage by 1% to 48%. Matches properties cache hit rate increased by
0.5% though, absorbing some of the sharing reduction.

I think this reduction in sharing on Wikipedia is worth it given that it bounds
the amount of time we spend in style sharing for applications where there's often
not much sharing possible.

R=leviw@chromium.org,eseidel@chromium.org

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

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