Fix linear scale tick format precision for non-fixed-point formats

Function d3.scale.linear.tickFormat() computes the precision for formatting tick values, but assumed that the format was "f" (fixed point).  For other formats such as "s" and "e" ticks might have the wrong precision (e.g., not be uniquely labeled) because the "precision" value used in those format specifiers has a different meaning. This fixes that issue, and includes some unit tests which pass only with the fix.