[LayoutNG] Add NGLineInfo::HasTrailingSpaces()

As a follow up on review comments in r616617 (CL:1374331),
where computing the width of preserved trailing spaces became
a little more expensive, and since it's not needed in most
common cases that we wanted to add a flag to skip the
computation when it's not needed.

In most cases, NGLineBreaker knows the answer, as it breaks
lines, or removes trailing collapsible spaces. This patch
tracks it as a state, and set the result to NGLineInfo.

Bug: 913995
Change-Id: I1eb570ea2d38bbc0597b6e03fb6dffe0d9de3973
Reviewed-on: https://chromium-review.googlesource.com/c/1382667
Commit-Queue: Koji Ishii <kojii@chromium.org>
Reviewed-by: Emil A Eklund <eae@chromium.org>
Cr-Commit-Position: refs/heads/master@{#618146}
6 files changed