Allow canceling polygons
This cancel button only works for polygons, not rectangles or selecting elements, since those tools rely on the user holding down the mouse button without being able to move it to the cancel button.
Closes #890 (closed)
Edited by Erwan Rouchet