.locale.c: Better emulate POSIX locale setting on Windows

Commit b385bb4ddcb252e69a1044d702646741e2e489fb introduced
my_setlocale() compiled only under Windows which emulates the POSIX
rules for setting the locale.  It differs from Windows only if the
locale passed in is "".  Unfortunately it was buggy if the category
being set was LC_ALL, and there is a LANG environment variable.  LANG
has lower precedence than the other environment variables, like
LC_NUMERIC, but my_setlocale() was giving it higher priority when set
through LC_ALL.

This should solve the problems being seen since
7cd8b56846670e577e1f62479eab8f38fb11da14