Fix case mapping buffer length divergence for synthetic caps

And provide locale to case WTF::String's upper implementation, which is
based on ICU transliterators. This fix handles all cases of Unicode's
SpecialCasing.txt case mapping rules list where the base character is
extended to two or more characters after case mapping, except those
cases where context is required. The latter case is tracked in
crbug.com/623940 and depends on ICU streaming uppercase API support.

Fix by adding multiple characters after case mapping to the same
HarfBuzz cluster index, which is nicely compatible with our previous
approaches for shaping result extraction, text selection, etc.

BUG=589335,605067
R=eae,behdad

Review-Url: https://codereview.chromium.org/2102113002
Cr-Commit-Position: refs/heads/master@{#402782}
5 files changed