Refactor word segmentation in CachingWordShapeIterator

This patch refactors CachingWordShapeIterator to separate the word
segmentation logic for caching purpose from the word shaping code.

In preparation of adjusting the word segmentation for caching
purpose for CJK, separating these two code helps.

No behavior changes.

BUG=570229

Review URL: https://codereview.chromium.org/1530833002

Cr-Commit-Position: refs/heads/master@{#366390}
1 file changed