[vim keymap] Repeat insert mode edit for "." key and [count] on enter insert mode action

Completes the following steps for https://github.com/marijnh/CodeMirror/issues/1568. This finishes @lynschinzer's work in https://github.com/marijnh/CodeMirror/pull/1550.

I did a decent amount of testing and fixed quite a few bugs with both the additions and existing code, but definitely did not cover all cases. @lynschinzer, if you have time could you help test? Thanks.

- [x] Implement basic change event merging algorithm for merging additions and simple deletions into a single insert mode edit.
- [x] Record changes made in insert mode.
- [x] Integrate the insert mode edit replay into `.`. This involves, in addition to existing logic, recording `actions` that cause edits for replay. If the action triggers insert mode, replay the insert mode edit along with the action when `.` is pressed.
- [x] Implement insert mode repeat when a count is specified on i and other enterInsertMode actions.

@marijnh if it's not too much work please don't squash so that authorship is preserved.