[LayoutNG] Report the correct text box info for dom snapshot

Current LayoutNG implementation of LayoutText::GetTextBoxInfo() simply
dumps text fragment info, which does not necessary match the legacy text
box info expected by the API.

This patch adds the missing parts:

- Legacy text boxes are broken at collapsed whitespaces but NG fragments
  are not. This patch uses NGOffsetMapping to help break the fragment at
  collapsed whitespaces.

- Legacy text boxes' start offset references the LayoutText::GetText()
  string. This patch converts the fragments' start offsets back onto
  the LayoutText string.

Bug: 636993
Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_layout_ng
Change-Id: Ib28f2a2382930ae5c1d1de7e85ea771ca19037cc
Reviewed-on: https://chromium-review.googlesource.com/c/1274051
Reviewed-by: Emil A Eklund <eae@chromium.org>
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#598451}
4 files changed