Added locale independent versions of snprintf function
Removed setlocale calls, used rrd_strtod & rrd_snprintf
Fixed some terrible indentations