Win32: unify environment case-sensitivity
The environment on Windows is case-insensitive. Some environment functions
(such as unsetenv and make_augmented_environment) have always used case-
sensitive comparisons instead, while others (getenv, putenv) were case-
insensitive. Recently, getenv has been changed to do a case-sensitive
before case-insensitive lookup to fix a problem in git's envsubst
implementation.
Prevent potential inconsistencies by using the same algorithm (case-
sensitive before case-insensitive) for all environment functions. This can
be implemented in the now central lookup_env function.
The original MSVCRT getenv (and thus, #undef getenv) is no longer needed,
direct references to mingw_getenv are no longer necessary.
Signed-off-by: Karsten Blees <blees@dcon.de>