old implementation only worked for points and linestrings, but geojson and kml can contain any geometry.
aso, d3 is a bit special[1] when working with geojson polygons: it does require clockwise winding, but typical geojson is either counterclockwise winding (RFC7946) or "winding doesn't matter" (old geojson.org spec). When inputing such geojson (or kml) input, iD would zoom out all the way, which is not the intended behavior.
[1] https://github.com/d3/d3-geo#d3-geo
This includes some renames for clarity.. "surface" -> "selection"
to make it clearer that rendering functions take a selection, and
don't necessarily render to the literal `#surface` node anymore.
* convert iD.Detect() iife to a module
* iD.Detect() should return loaded locale (except for 'en')
(The previous code was a hack to replace the detected locale with the loaded
locale. Now that Detect is a module, we can not replace the detected locale
from external code, but we can have Detect() return the locale we really want)