fmt_signif function

Format a number with the correct number of significant digits and trailing zeroes.