PERF: Ensure locales are always handled as symbols internally (PR #12897)

Sometimes, parts of the application pass in the locale as a string, not a symbol. This was causing the translate_accelerator to cache two versions of the locale separately: one cache for the symbol version, and one cache for the string version. For example, in a running production process:

irb(main):001:0> I18n.instance_variable_get(:@loaded_locales)
=> [:en, "en"]

This commit ensures the locale key is always converted to a symbol, and adds a spec to ensure the same locale cannot appear twice in @loaded_locales

GitHub

Nice catch.