Componentize script to generate UI string overrides mapping.

Change the API of the script to generate both the header and source file
and to take a list of header files as input (to allow overridding strings
from components/components_strings.grd).

The script is now generating a method CreateUIStringOverrider() and hides
the arrays in the implementation file and allow customization of the
namespace in which the function and code is generated.

Introduce a new target "chrome_ui_string_overrider_factory" in the gyp
build to mimic the same target in the gn build (compiles the source file
generated by the script).

Rename the script from to generate_ui_string_overrider.py to reflect the
new role of the script and move it to components/variations/service.

Introduce .gni file to help using the script by different embedders (don't
introduce .gypi files as it is much harder to share code for gyp).

Componentize ui_string_overrider_unittest.cc.

BUG=534257

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

Cr-Commit-Position: refs/heads/master@{#352308}
diff --git a/chrome/browser/BUILD.gn b/chrome/browser/BUILD.gn
index 9fa3cf05..dab46f1 100644
--- a/chrome/browser/BUILD.gn
+++ b/chrome/browser/BUILD.gn
@@ -93,9 +93,9 @@
     "//chrome:extra_resources",
     "//chrome:resources",
     "//chrome:strings",
-    "//chrome/app:generated_resources_map",
     "//chrome/app/resources:platform_locale_settings",
     "//chrome/app/theme:theme_resources",
+    "//chrome/browser/metrics/variations:chrome_ui_string_overrider_factory",
     "//chrome/browser/net:probe_message_proto",
     "//chrome/browser/ui",
     "//chrome/common",
@@ -264,9 +264,9 @@
     deps += [
       "//apps",
       "//cc",
-      "//chrome/app:generated_resources_map",
       "//chrome/app/theme:theme_resources",
       "//chrome/browser/devtools",
+      "//chrome/browser/metrics/variations:chrome_ui_string_overrider_factory",
       "//chrome/browser/resources:component_extension_resources",
       "//chrome/common/net",
       "//chrome/installer/util",