Make StartOfWord() utilitize TextSegments class

This patch changes |StartOfWord()| to utilize |TextSegments|
class to make it work with LayoutNG.

This patch also fixes existing incorrect behavior on
fast/text/international/cjk-segmentation.html

Bug: 778507
Change-Id: Iedee4632206154c8e813f3e43136c1a000e39435
Reviewed-on: https://chromium-review.googlesource.com/c/1309227
Commit-Queue: Xiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: Yoichi Osato <yoichio@chromium.org>
Reviewed-by: Yoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#607796}
5 files changed