Reset insert mode when caret is moved using mouse.

Starting a repeated "insert line" command could trigger a bunch of text
to be spammed over your file in case you put the cursor further along
the file. This is due the Insert mode "change recorder" thinking that
everything between the start and current position is part of this
changeset. Similarly, doing a plain edit and clicking with the mouse
will include all changes at the second location in the same edit,
meaning that Undo/redo will change the whole chunk of text in between.

If the mouse is clicked now, simply reset the current editing session,
including any pending "repeat commands" or the undo status.

Fixes #506 and closes #516.