Allow to set the layer style

By firing a simple CHANGE event, we can redraw the layer when
a style is assigned.
Set boolean value to HTMLInputElement.checked

See http://www.whatwg.org/specs/web-apps/current-work/multipage/the-input-element.html#attr-input-checked
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 #1266 from fredj/input_checked

Set boolean value to HTMLInputElement.checked
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