Refactor WordIterator to avoid copying to internal buffers

Previously, since the assumption was that the string is passed down
to ICU4C for the iteration to run, a window of text was copied and
maintained. But now, we can just pass an iterator to the input
CharSequence directly to ICU4J.

Bug: 21832431
Change-Id: Ife5dfdb1d90b3eda2817d4d75747b7abc34a2299
3 files changed