This commit implements EnvUtils::setenv, and ensures it uses
fromLocal8Bit/toLocal8Bit like setenv() does.
Originally implemented by Jan Klass (UTF-8 version)
In the common case, we still use UTF-8, since most users use a
UTF-8 locale, but for the users who do not, this ensures we don't
destructively rewrite any environment variables.