schema tree REFACTOR pass only new mod set when parsing modules

Parsing and compilation being strictly separate,
pass only new mod set (creating) from unres to
parsing functions to make the distinction explicit.
diff --git a/tests/utests/schema/test_parser_yin.c b/tests/utests/schema/test_parser_yin.c
index d492591..66b454d 100644
--- a/tests/utests/schema/test_parser_yin.c
+++ b/tests/utests/schema/test_parser_yin.c
@@ -3681,7 +3681,7 @@
     struct lys_module *mod;
     struct lys_yin_parser_ctx *yin_ctx = NULL;
     struct ly_in *in = NULL;
-    struct lys_glob_unres unres = {0};
+    struct ly_set new_mods = {0};
 
     mod = calloc(1, sizeof *mod);
     mod->ctx = UTEST_LYCTX;
@@ -3707,10 +3707,10 @@
             "    </md:annotation>\n"
             "</module>\n";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_SUCCESS);
+    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &new_mods), LY_SUCCESS);
     assert_null(mod->parsed->exts->child->next->child);
     assert_string_equal(mod->parsed->exts->child->next->arg, "test");
-    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
+    ly_set_erase(&new_mods, NULL);
     lys_module_free(mod);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -3748,8 +3748,8 @@
             "    </list>\n"
             "</module>\n";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_SUCCESS);
-    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
+    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &new_mods), LY_SUCCESS);
+    ly_set_erase(&new_mods, NULL);
     lys_module_free(mod);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -3764,8 +3764,8 @@
             "    <prefix value=\"foo\"/>\n"
             "</module>\n";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_SUCCESS);
-    lys_compile_unres_glob_erase(UTEST_LYCTX, &unres);
+    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &new_mods), LY_SUCCESS);
+    ly_set_erase(&new_mods, NULL);
     lys_module_free(mod);
     yin_parser_ctx_free(yin_ctx);
     ly_in_free(in, 0);
@@ -3777,7 +3777,7 @@
     data = "<submodule name=\"example-foo\" xmlns=\"urn:ietf:params:xml:ns:yang:yin:1\">"
             "</submodule>\n";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_EINVAL);
+    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &new_mods), LY_EINVAL);
     CHECK_LOG_CTX("Input data contains submodule which cannot be parsed directly without its main module.", NULL);
     lys_module_free(mod);
     yin_parser_ctx_free(yin_ctx);
@@ -3792,7 +3792,7 @@
             "</module>\n"
             "<module>";
     assert_int_equal(ly_in_new_memory(data, &in), LY_SUCCESS);
-    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &unres), LY_EVALID);
+    assert_int_equal(yin_parse_module(&yin_ctx, in, mod, &new_mods), LY_EVALID);
     CHECK_LOG_CTX("Trailing garbage \"<module>\" after module, expected end-of-input.", "Line number 6.");
     lys_module_free(mod);
     yin_parser_ctx_free(yin_ctx);