Use auto repeat mode

I found that iTerm2 recognizes AUTOREPEAT_MODE (DECARM) but now it's not used at all.
This patch utilizes this mode when repeated keyboard events are detected.
It makes iTerm2 pass VTTEST 5-2 and improve compatibility with other terminals.