[vim] clip cursor, fix #1084

my try at a fix for #1084. instead of @metatheos' approach of tracking `vim.head`, i peek at the current mode

some notes / thoughts:

- the mode should be a string instead of an increasing number of bools, which would eventually show up in the status bar #1628

- similarly, instead of defining a new bool for each keymap w/ an init function, keymaps should have optional callbacks. although, vim may be the only keymap needing an init function

- i had to modify codemirror's `historyChangeFromChange`, as modifying the cursor in the `beforeSelectionChange` callback caused an issue where undoing a deletion would delete a character to the left of the cursor

@mightyguava