Easier cursor join/remove, prevent stuck at edge

Fixes #33

We now remove the cursor on mouse exitting the window.

Also increased the distance at which we can interact with another held
down cursor to 20.

Some general code cleanup