patch 9.0.0980: the keyboard state response may end up in a shell command

Problem:    The keyboard state response may end up in a shell command.
Solution:   Only request the keyboard protocol state when the typeahead is
            empty, no more commands are following and not exiting.  Add the
            t_RK termcap entry for this.
diff --git a/src/proto/term.pro b/src/proto/term.pro
index b1c691d..93edba1 100644
--- a/src/proto/term.pro
+++ b/src/proto/term.pro
@@ -48,6 +48,8 @@
 void shell_resized_check(void);
 void set_shellsize(int width, int height, int mustset);
 void out_str_t_TE(void);
+void out_str_t_TI(void);
+void may_send_t_RK(void);
 void settmode(tmode_T tmode);
 void starttermcap(void);
 void stoptermcap(void);