patch 8.2.0114: info about sourced scripts is scattered

Problem:    Info about sourced scripts is scattered.
Solution:   Use scriptitem_T for info about a script, including s: variables.
            Drop ga_scripts.
diff --git a/src/scriptfile.c b/src/scriptfile.c
index a175541..a574bf6 100644
--- a/src/scriptfile.c
+++ b/src/scriptfile.c
@@ -1236,7 +1236,7 @@
 
     save_current_sctx = current_sctx;
     current_sctx.sc_lnum = 0;
-    current_sctx.sc_version = 1;
+    current_sctx.sc_version = 1;  // default script version
 
     // Check if this script was sourced before to finds its SID.
     // If it's new, generate a new SID.
@@ -1272,6 +1272,10 @@
 	{
 	    ++script_items.ga_len;
 	    SCRIPT_ITEM(script_items.ga_len).sn_name = NULL;
+	    SCRIPT_ITEM(script_items.ga_len).sn_version = 1;
+
+	    // Allocate the local script variables to use for this script.
+	    new_script_vars(script_items.ga_len);
 # ifdef FEAT_PROFILE
 	    SCRIPT_ITEM(script_items.ga_len).sn_prof_on = FALSE;
 # endif
@@ -1289,9 +1293,6 @@
 	else
 	    si->sn_dev_valid = FALSE;
 # endif
-
-	// Allocate the local script variables to use for this script.
-	new_script_vars(current_sctx.sc_sid);
     }
 
 # ifdef FEAT_PROFILE
@@ -1483,6 +1484,8 @@
 
     for (i = script_items.ga_len; i > 0; --i)
     {
+	// the variables themselves are cleared in evalvars_clear()
+	vim_free(SCRIPT_ITEM(i).sn_vars);
 	vim_free(SCRIPT_ITEM(i).sn_name);
 #  ifdef FEAT_PROFILE
 	ga_clear(&SCRIPT_ITEM(i).sn_prl_ga);
@@ -1791,7 +1794,10 @@
     else if (nr > 4)
 	semsg(_("E999: scriptversion not supported: %d"), nr);
     else
+    {
 	current_sctx.sc_version = nr;
+	SCRIPT_ITEM(current_sctx.sc_sid).sn_version = nr;
+    }
 #endif
 }