tests CHANGE extend tests of default values in schemas

Covers deviating the default values and their types. Also fixes several
bugs in schema compilation and built-in data type plugins.
diff --git a/src/tree_schema_internal.h b/src/tree_schema_internal.h
index e928a76..9069361 100644
--- a/src/tree_schema_internal.h
+++ b/src/tree_schema_internal.h
@@ -60,6 +60,12 @@
     uint8_t mod_version; /**< module's version */
 };
 
+struct lysc_incomplete_dflt {
+    struct lyd_value *dflt;
+    struct lys_module *dflt_mod;
+    struct lysc_node *context_node;
+};
+
 /**
  * @brief internal context for compilation
  */
@@ -72,6 +78,7 @@
                                      the target module (mod) */
     struct ly_set groupings;    /**< stack for groupings circular check */
     struct ly_set unres;        /**< to validate leafref's target and xpath of when/must */
+    struct ly_set dflts;        /**< set of incomplete default values */
     struct ly_set tpdf_chain;
     uint16_t path_len;
     int options;                /**< various @ref scflags. */