Refactoring in preparation for Layer Squashing v2.

A prerequisite for Layer Squashing version 2 is that multiple arbitrary
subtrees of RenderLayers need to be able to contribute to the same
GraphicsLayer. This patch creates a simple data structure that
represents information needed for a partial RenderLayer subtree
to paint into a GraphicsLayer.  This allows us to de-couple the
RenderLayer tree from GraphicsLayer tree for more compositing
flexibility.

Subsequent patches (not required for layer squashing) will move the
paintPhase from GraphicsLayer to RenderLayerBacking, and keep track
of a "PaintTask" for each GraphicsLayer within RenderLayerBacking.

BUG=261605

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

git-svn-id: svn://svn.chromium.org/blink/trunk@155466 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Make ElementRuleCollector aware of tree position.

With Shadow DOM, we have multiple trees, and since each of these trees may contain StyleRules,
the mere RuleData::position() is not enough to accurately describe one element's position
relative to another. This is why we need to start storing a transient "tree position" value,
which informs the sorting machinery of how to treat rules from different trees.

Currently, the awareness terminates at StyleResolver/ScopedStyleResolver, since these fellas
are the ones who will provide position value. Note, the position could be calculated per-element resolve,
which means that it does NOT need to be a stable position index for the same tree between style recalcs for an
element.

This hopefully, will make https://codereview.chromium.org/19500004/ easier to implement.

No functional changes, no tests.

BUG=247275
R=eseidel, esprehn, tasak

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

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