Fix BCP47 language tag validation - extlang and privateuse extension

Extlang subtag can only be preceded by 2 or 3 letter language code.
The length check for the preceding subtag was missing.

In addition, the singleton check for private use extension was buggy.

Add 'USE_CHROMIUM_ICU" to BUILD.gn to let v8 take different code paths
depending on whether or not Chromium's ICU with patches is used. This
distinction can be important for Node.js

TBR=gsathya@chromium.org
Bug: v8:8135
Test: v8: test262/intl402/Intl/getCanonicalLocales/*
Change-Id: I431d582ec5b8e730698067d1795b1107dd3d016f
Reviewed-on: https://chromium-review.googlesource.com/1214645
Reviewed-by: Jungshik Shin <jshin@chromium.org>
4 files changed