Repeat typing

This is quite the WIP. I need some help from @nathansobo on things that I have commented on inline.

The goal is to make `.` work with typing. Currently this works for typing which has no deletions (backspaces). It's also not quite accurate yet; `s`, for example, deletes a character and enters insert mode, and `.` currently won't delete the character. I can fix up the edge cases if we can get this to a workable place.