RAL: Eliminate n^2 walk to find repaint containers

Instead of walking up from every renderer to find the containerForRepaint,
pass the current repaint container along through repaintTreeAfterLayout
and update it when we pass through a renderer that's a repaint container.

This patch also introduces an isRepaintContainer function. This is guaranteed
to be able to be a repaint container, but due to filters and regions,
isn't guaranteed to be the repaint container for non-composited descendant
renderers. The magic logic to handle these special cases has been moved to
an adjustCompositedContainerForSpecialAncestors function, which has been
split out of containerForRepaint.

This patch also adds a switch in RenderBox to avoid unnecessarily mallocing
LayoutStates when we know our repaint container isn't the view.

BUG=320139

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

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