patch 8.1.1402: "timer" option of popup windows not supported

Problem:    "timer" option of popup windows not supported.
Solution:   Implement the "timer" option. (Yasuhiro Matsumoto, closes #4439)
diff --git a/src/structs.h b/src/structs.h
index e424830..7ead00c 100644
--- a/src/structs.h
+++ b/src/structs.h
@@ -1941,6 +1941,24 @@
 } syn_time_T;
 #endif
 
+typedef struct timer_S timer_T;
+struct timer_S
+{
+    long	tr_id;
+#ifdef FEAT_TIMERS
+    timer_T	*tr_next;
+    timer_T	*tr_prev;
+    proftime_T	tr_due;		    /* when the callback is to be invoked */
+    char	tr_firing;	    /* when TRUE callback is being called */
+    char	tr_paused;	    /* when TRUE callback is not invoked */
+    int		tr_repeat;	    /* number of times to repeat, -1 forever */
+    long	tr_interval;	    /* msec */
+    char_u	*tr_callback;	    /* allocated */
+    partial_T	*tr_partial;
+    int		tr_emsg_count;
+#endif
+};
+
 #ifdef FEAT_CRYPT
 /*
  * Structure to hold the type of encryption and the state of encryption or
@@ -2856,6 +2874,7 @@
     int		w_zindex;
     int		w_maxheight;	    // "maxheight" for popup window
     int		w_maxwidth;	    // "maxwidth" for popup window
+    timer_T	*w_popup_timer;	    // timer for closing popup window
 #endif
 
 
@@ -3434,24 +3453,6 @@
 };
 typedef struct js_reader js_read_T;
 
-typedef struct timer_S timer_T;
-struct timer_S
-{
-    long	tr_id;
-#ifdef FEAT_TIMERS
-    timer_T	*tr_next;
-    timer_T	*tr_prev;
-    proftime_T	tr_due;		    /* when the callback is to be invoked */
-    char	tr_firing;	    /* when TRUE callback is being called */
-    char	tr_paused;	    /* when TRUE callback is not invoked */
-    int		tr_repeat;	    /* number of times to repeat, -1 forever */
-    long	tr_interval;	    /* msec */
-    char_u	*tr_callback;	    /* allocated */
-    partial_T	*tr_partial;
-    int		tr_emsg_count;
-#endif
-};
-
 /* Maximum number of commands from + or -c arguments. */
 #define MAX_ARG_CMDS 10