See #2012 for some context. Many unicode-related tasks need that
coaelescing to handle unicode correctly. If for some reason, the user is
using a not using a non-unicode locale, we want to ensure that at least
LC_CTYPE is set to an unicode locale.
It's difficult to know if a locale is an unicode one, so we assume that
we want UTF-8 as an unicode codec. Aliases are not handled, so LC_CTYPE
may be redefined even if it was already unicode aware.
The first available UTF-8 locale is used because there is no guarantee
that C.UTF-8 or en_US.UTF-8 are available. For LC_CTYPE, there is no
difference between those locales as coaelescing is not dependant on the
language.
LC_CTYPE is exported as oh-my-zsh may use some shell tools at some
point (sed, awk, ...).
LANG is a colon-separated list of prefered locales; LC_CTYPE is single entry,
therefore we need to remove all but one entry.
Also, there is no need setting it if it is already set (LC_ALL also sets
LC_CTYPE, so we check it too).