Use minikin's HyphenatorMap in LineBreaker.

This CL contains the following changes:
- Use language ID as the locale input of addStyleRun.
- Resolve Hyphenator with minikin's HyphenatorMap.
- Pool the ICU's LineBreaker.
  Creating an ICU LineBreaker takes some time. Thus, pool
  them and use the same instances later.
- Use FontLanguage as the locale input of WordBreaker.

Here is a performance scores: (w/o patch -> w/ patch)

StaticLayoutPerfTest (median):
createRandom:          4,044,875 -> 3,896,743 (-3.7%)
createRandom Balanced: 3,985,204 -> 3,821,016 (-4.1%)

TextViewOnMeasurePerfTest (median):
measure_AtMost:      44,064,070 -> 38,746,998 (-12.1%)
measure_Exactly:     43,028,018 -> 37,827,794 (-12.1%)
measure_Unspecified: 71,863,028 -> 65,774,110 (-8.5%)

Bug: 65024629
Bug: 67319341
Test: minikin_test
Change-Id: Ibf173e0b0b29c33eaad790b65dad6fd8a1190e47
diff --git a/libs/minikin/Hyphenator.cpp b/libs/minikin/Hyphenator.cpp
index 11b6eb4..ef10a2c 100644
--- a/libs/minikin/Hyphenator.cpp
+++ b/libs/minikin/Hyphenator.cpp
@@ -111,16 +111,14 @@
 // static
 // TODO: Replace language/languageLength with StringPiece
 Hyphenator* Hyphenator::loadBinary(const uint8_t* patternData, size_t minPrefix, size_t minSuffix,
-        const char* language, size_t languageLength) {
+        const std::string& locale) {
     HyphenationLocale hyphenLocale = HyphenationLocale::OTHER;
-    if (languageLength == 2) {
-        if (language[0] == 'c' && language[1] == 'a') {
-            hyphenLocale = HyphenationLocale::CATALAN;
-        } else if (language[0] == 'p' && language[1] == 'l') {
-            hyphenLocale = HyphenationLocale::POLISH;
-        } else if (language[0] == 's' && language[1] == 'l') {
-            hyphenLocale = HyphenationLocale::SLOVENIAN;
-        }
+    if (locale == "pl") {
+        hyphenLocale = HyphenationLocale::POLISH;
+    } else if (locale == "ca") {
+        hyphenLocale = HyphenationLocale::CATALAN;
+    } else if (locale == " sl") {
+        hyphenLocale = HyphenationLocale::SLOVENIAN;
     }
     return new Hyphenator(patternData, minPrefix, minSuffix, hyphenLocale);
 }