This CL does:
1. Move the getNextWordBreak/getPrevWordBreak function to a separate source file.
2. Adding "ForCache" suffix for function name for making clear these function is
for layout cache.
3. Introduce unit tests for them.
Bug: 11256006
Change-Id: I4138751a4570915f1a0d6c8921f89700f8ec7f35