Avoid forcing layout on children with orthogonal flow

Flexbox always sets an override size on its children, and
keying off that, we force layout in preferredMainAxisContentExtentForChild
to get the preferred logical height. This patch caches that
value, and only re-lays out the child when necessary.

The original version of this patch was authored by abarth,
whose original patch uncovered a bug that was masked by
the additional layout. resetAutoMarginsAndLogicalTopInCrossAxis
previously reset the logical top but not auto margins.
This would cause us to double-count cross-axis margins
later on.

BUG=333116

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

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