[LayoutNG] Bidi reorder after fragments were produced

This patch changes to run bidi reordering after fragments were
produced.

Before this patch, bidi reorder runs against NGInlineItemResult.
NGInlineItemResult has order-dependent items such as open/close,
which made computing inline boxes harder.

With this change, inline offsets of fragments are not known
until later stages. The logic for inline out-of-flow objects
is delayed until inline offsets are computed.

There are a few work to be worked on in following patches.
* There are rooms to optimize for LTR.
* Inline box fragmentation is not implemented yet.
* There are some incorrectness to compute inline margins/borders/
  paddings for RTL.

Existing tests pass, but not many tests turn to pass due to above.

Bug: 636993, 785687
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_layout_tests_layout_ng
Change-Id: I19cef971cd0e494999cfb9e58531766c47adec68
Reviewed-on: https://chromium-review.googlesource.com/827043
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#524977}
9 files changed