Coerce quantile scale domain to numbers.

Also only coerce values to numbers once in d3.{mean,median}.