Implement cancel action for esc key.

Pressing the esc key will now
- deselect all vertices in vertex mode
- erase all clip points in clip mode
- deactivate the current tool if one is active
- deselect everything
in this order, e.g., the vertex will only be deactivated if no vertices are currently selected.
Add reset button to rotate tool.

Also don't reset the handle position when the tool is activated.
Fix some problems with spaces in paths.
Minor build system fixes.
Minor fixes to build system.
More fixes to the build system.
Fixes to the build system.
Final changes to build system.