patch 8.1.2046: SafeState may be triggered at the wrong moment

Problem:    SafeState may be triggered at the wrong moment.
Solution:   Move it up higher to after where messages are processed.  Add a
            SafeStateAgain event to tigger there.
diff --git a/src/vim.h b/src/vim.h
index 4b817c5..8bfbcaf 100644
--- a/src/vim.h
+++ b/src/vim.h
@@ -1316,6 +1316,7 @@
     EVENT_QUITPRE,		// before :quit
     EVENT_REMOTEREPLY,		// upon string reception from a remote vim
     EVENT_SAFESTATE,		// going to wait for a character
+    EVENT_SAFESTATEAGAIN,	// still waiting for a character
     EVENT_SESSIONLOADPOST,	// after loading a session file
     EVENT_SHELLCMDPOST,		// after ":!cmd"
     EVENT_SHELLFILTERPOST,	// after ":1,2!cmd", ":w !cmd", ":r !cmd".