Support src/build/linux/unbundle in CharacterDataGenerator

This patch fixes CharacterDataGenerator introduced in crrev.com/371917
to work with src/build/linux/unbundle/replace_gyp_files.py, which some
distributors rely on.

UTrie2 in ICU is not available in that configuration. UnicodeSet is
available in all configurations and can provide similar functionalities,
but it is slower than UTrie2 by ~80% and consumes slightly more private
memory. It is still faster than the original hand-written code though.

This patch uses UnicodeSet in such configurations while uses UTrie2 in
other configurations.

BUG=584920

Review URL: https://codereview.chromium.org/1742293002

Cr-Commit-Position: refs/heads/master@{#378253}
4 files changed