Fix the "write double" functions not working with some locales

The following:
snprintf(buf, "%lf", value);

will not generate the same output across all the possible locales.
This is a problem, as the kernel (through sysfs) expects the double
value to be in the US format (with a dot as the radix).

The new read_double / write_double functions work around that by
temporarily switching the current thread to the POSIX locale, just for
the time needed to run the snprintf or strtod.

Signed-off-by: Paul Cercueil <paul.cercueil@analog.com>