Allow to set the layer style

By firing a simple CHANGE event, we can redraw the layer when
a style is assigned.
Deep clone geometry coordinates

Our geometries are mutable, so they can be modified without
creating garbage by changing coordinates in place and calling
setGeometry afterwards. But this also means that we need to
create a deep clone of the coordinates.
Be more strict with {Element} types
Merge pull request #1270 from fredj/element_jsdoc

Be more strict with {Element} types
Merge pull request #1267 from ahocevar/geom-clone

Deep clone geometry coordinates
Merge pull request #1265 from ahocevar/set-style

Allow to set the layer style
Draw interaction
Add point at head of drawing
Finish lines by clicking last point
Snap to finish with configurable tolerance
Pop off last point from linestring
Ensure drawing is not finished prematurely
Updated sketch style
Stop dblclick propagation while editing
Add method to abort drawing
Allow user to set drawing mode
Add click tolerance to allow dragging while drawing
Updated style for draw example
Remove setMode method from interaction in favor of add/removeInteraction

This makes the example a bit more awkward, but eventually adding and removing interactions will be the job of an editing control.
Use geometry type enum for configuring draw interaction

This allows us to cast single-part geometries to multi-part types before adding features to the target layer.  This doesn't yet allow for drawing multi-part geometries with multiple parts.  That can be handled separately.