patch 8.1.2361: MS-Windows: test failures related to VIMDLL

Problem:    MS-Windows: test failures related to VIMDLL.
Solution:   Adjust code and tests. (Ken Takata, closes #5283)
diff --git a/src/gui_w32.c b/src/gui_w32.c
index 429b457..d5dfeff 100644
--- a/src/gui_w32.c
+++ b/src/gui_w32.c
@@ -5746,6 +5746,14 @@
     HIMC	hImc;
     static HIMC	hImcOld = (HIMC)0;
 
+# ifdef VIMDLL
+    if (!gui.in_use && !gui.starting)
+    {
+	mbyte_im_set_active(active);
+	return;
+    }
+# endif
+
     if (pImmGetContext)	    /* if NULL imm32.dll wasn't loaded (yet) */
     {
 	if (p_imdisable)
@@ -5815,6 +5823,11 @@
     int		status = 0;
     HIMC	hImc;
 
+# ifdef VIMDLL
+    if (!gui.in_use && !gui.starting)
+	return mbyte_im_get_status();
+# endif
+
     if (pImmGetContext && (hImc = pImmGetContext(s_hwnd)) != (HIMC)0)
     {
 	status = pImmGetOpenStatus(hImc) ? 1 : 0;