Replace style sharing cousin list search with LRU

The current implementation of style sharing uses a very confusing set of methods to
search a node's cousins in an attempt to find other nodes to share style with. This
patch replaces this confusing method with a simple LRU that allows us to find
nodes to share with even if they're not our cousins.

Re-worked to be simpler in the lazy-attach world (thanks esprehn & ojan!).

Previous commits of this change had perf regressions, the last of which should be
handled by only adding elements to the style sharing LRU during recalcStyle if sharing
is indeed possible for the element. Without this, in the degenerate case where there's
a large document and no elements can share style (like the fixed-grid-lots-of-data
performance test) we'd end up doing more work.

Because this change introduces RefPtrs that can hold onto nodes while the style
resolver is active, Internal gc functions are updated to clear the style sharing list.

Previous codereviews https://codereview.chromium.org/23075004/ and
https://chromiumcodereview.appspot.com/23049008

BUG=272363,286376

Review URL: https://chromiumcodereview.appspot.com/24106007

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