[layoutng] Handle pre-layout of orthogonal writing modes better

This code previously skipped NG layout objects for performance
reasons (https://codereview.chromium.org/2666663002 and
https://chromium-review.googlesource.com/1073408).

However, we do need to prelayout orthogonal roots if their
containing block is legacy so that we can correctly compute
the intrinsic widths of such containing blocks. This should not
cause double layouts because nothing will mark the NG object
as needing layout in this case.

Bug: 635619
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: I63f8384170fe815780c79510b96e436014c39797
Reviewed-on: https://chromium-review.googlesource.com/1180714
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Christian Biesinger <cbiesinger@chromium.org>
Cr-Commit-Position: refs/heads/master@{#584496}
2 files changed