Prepare Chromium and Blink for ICU 59
ICU 59 uses char16_t as UChar instead of {wchar_t, uint16_t}.
As a result, char16_t is not compatible with char16 any more.
When constructing string16 from UnicodeString/UChar buffer, we need to
reinterpret_cast with a barrier (to avoid an anti-aliasing optimzation
by some compilers).
Add UnicodeStringToString16() to base/i18n that utilizes ICU 59-to-be's
helper for the casting regardless of anti-aliasing optimization.
And, refactor UnicodeString->string16->UTF8 string to UnicodeString->UTF8
in a few places.
For ICU C API "clients", UChar will be configured to be {wchar_t, uint16_t}
so that there's little to be changed.
This was tested with an ICU branch with char16_t as UChar.
http://source.icu-project.org/repos/icu/branches/markus/ucharptr2/
BUG=
693640
TEST=trybots are all green.
Review-Url:
https://codereview.chromium.org/2740673002
Cr-Commit-Position: refs/heads/master@{#459034}
Committed:
https://chromium.googlesource.com/chromium/src/+/6d1b9d119afca4a0384aba439b398188c0f6827b