patch 8.0.0784: job of terminal may be garbage collected

Problem:    Job of terminal may be garbage collected.
Solution:   Set copyID on job in terminal. (Ozaki Kiichi)
diff --git a/src/eval.c b/src/eval.c
index 401171c..4cb3289 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -5329,6 +5329,10 @@
     abort = abort || set_ref_in_quickfix(copyID);
 #endif
 
+#ifdef FEAT_TERMINAL
+    abort = abort || set_ref_in_term(copyID);
+#endif
+
     if (!abort)
     {
 	/*