Completely rework event handling on view and tools.
Completely rework event handling on view and tools.

Fixes multiple issues on iOS:
- mousedown events were sometimes fired twice.,
- the presence of mousedown handlers broke scrolling.
Closes #266.

lehni/palette.js