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.
Adding ModifyFeature interaction

This is a first draft. The way geometry changes are handled for
now is a bit clumsy. Both updating the feature cache RTree and
making the layer aware of feature and geometry changes could be
handled in a smarter way if these changes would be made through
the layer instead of directly on the geometry or feature.
Separate add listener from method that adds index
Do not split segments while in the loop

In combination with the additional squaredDistanceToSegment
check we can ensure that a future vertex is only created on one
segment per feature, and only on the segment that it appears on.

This change also renames the misleading dragVertices_ member to
dragSegments_.
Write modifications back to the original layer

With the feature's getOriginal() and setOriginal() methods, an
undo tree can be maintained now.