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.
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.
Tests for draw interaction

The tests revealed that polygons can be drawn with counter-clockwise exterior ring order.  In the polygon constructor, we enforce clockwise winding for exterior rings.  So after drawing, we pass polygon coordinates back to the constructor before adding feature to the target layer.
Merge pull request #1263 from tschaub/draw-interaction

Add interaction for drawing new features.