Only allocate temporary layer lists when sorting contributions.

Previously, I'd constructed temporary layer lists to hold the layer list
contributions from children when I visited them out of order in CalcDrawProps.
Unfortunately ~RenderSurfaceLayerList frees all the surfaces, so when the
temporary lists were destroyed, the surfaces would be nuked. To work around
this, I don't pass temporary lists to children, I just sort the "real" lists
after the recursion. When doing this sorting I allocate a LayerList for
Layers and a LayerImplList for LayerImpls. The types got a bit unwieldy when
doing this, so I also put some handy typedefs in Layer and LayerImpl. This lets
us cut down on the number of template parameters we use in LTHC.

TEST=LayerTreeHostCommonTest.OutOfOrderClippingRequiresRSLLSorting
R=danakj@chromium.org
BUG=309381

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229619 0039d316-1c4b-4281-b951-d872f2087c98
SVN changes up to revision 229619