Fix coercion in d3.{mean,median}. Fix d3.format("-").

Fixes #2067, #2069 and #2072.