Use std::stringstream instead of snprintf() for double->string conversio...

...n

snprintf() will use the current locale for converting a double to a string,
which will use a ',' instead of a '.' in some locales (e.g. de_DE).
std::stringstream allows setting the locale to "C" to always get a '.'.
I think you had 2 problems. First, you might have had issues with your tool-chain. If you set `LC_ALL` in your `makefile` and `export` it, then it becomes the default. From your code, I am not sure how you were injecting it. I would need to see your makefile.

Second, and more important, you need to run `set locale(LC_NUMERIC, val)` *after* you set the global locale.

Here is my makefile and example, which works as expected:
* https://gist.github.com/cdunn2001/61bc4a05ce906492defd

So I would like to revert your change. Is that ok?