[vim] Macro clean up

Turn MacroModeState into a proper object instead of just a bag of properties.
fix a spelling error (unamed)
accumulate keys and insert mode changes directly into registers rather than copying from MacroModeState
store keybuffers in macro registers rather than text strings
fix bugs in macro handling (searching via 't' and 'f' keys was broken)
simplify control flow of macros