Move bulk of POSIX::setlocale to locale.c