strutil: Add a helper to get the precision of a float
There are a few different instruments where the precision of a
measurement can be determined from the number of decimals in the
reported floats. Add a helper to determine this.
The implemented version of sr_count_digits performs more stringent
error checking than the original version in
sr_atod_ascii_digits. There are two reasons for this: First, we can no
longer rely on atod failing if the provided value is invalid. Second,
there are exotic float formats accepted by atod that we don't support
and we don't want to be in a situation where atod accepts a value and
count digits returns an incorrect value.