Reland r168742 "Introduce HeapTerminatedArray and HeapTerminatedArrayBuilder."

This is unmodified patch. It was reverted due to HeapTest.HeapTerminatedArray failures on Android which were fixed in r168922.

BUG=
TBR=haraken@chromium.org

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

git-svn-id: svn://svn.chromium.org/blink/trunk@168963 bbb929c8-8fbe-4397-9dbb-9b2b20218538
Fix crash on ASSERT when in subtree layout and LayoutState is not initialized

Fix crash on ASSERT when in subtree layout and LayoutState is not initialized.
This was caused by r167724 which improperly assumed that FrameView::isSubtreeLayout
was equivalent to the parameter inSubtreeLayout as passed to the layout methods.
In fact, there are cases where inSubtreeLayout is true while FrameView::isSubtreeLayout
returns false.

BUG=348481
R=eseidel@chromium.org

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

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