Permit layer stamping to be overridden

Extracts the detail of how layers are stamped to a single
method which can be overridden. mapbox.js is going to use
this in [markerLayer](https://github.com/mapbox/mapbox.js/blob/v1/src/marker_layer.js)
to implement a [key](http://mapbox.com/mapbox.js/api/v0.6.7/#markers.key) function.

I suspect it will also be useful towards #1416 -- in general, it's
useful to be able to set up a GeoJSON layer group that associates
features and layers based on the feature's `id` property rather
than an arbitrary monotonic stamp.