Drop to command mode before processing an undo in insert mode

Should fix https://github.com/atom/atom/issues/2689

@cranesandcaff @bhgames can you try this branch out and make sure it solves the issue you're having?