Replace text strings with grapheme arrays in onContentChange

Was previously generating incorrect transactions when document
contained multibyte characters.

Bug: 51140
Change-Id: Ie5f749768f970b2aef09e667f844d2ef5961207b
Merge "Replace text strings with grapheme arrays in onContentChange"