Change the escape key binding in insert mode (in vi key bindings) to check if we are in paging mode. If so, emit cancel and stay in insert mode. Otherwise perform the current behavior of switching back to default mode and adjusting the cursor. Fixes #2871