Locale data can vary across platforms. Rather than hard-code the expected
data in the units tests, get it from the OS via the C API.
This fixes these unit tests on FreeBSD. It might fix them on Linux, too.
I have not tested other platforms, but I will if I get agreement
on the approach.
localeconv()->grouping can become invalid after we reset the locale to "C", so duplicate the string into a local.