plugin types REFACTOR remove STORE and CANONIZE flags

The behavior was changed as if both of these
flags are always set. Also, types now always
include their canonical/JSON string value.

Finally, default value resolution was also
refactored to avoid some code duplication.
This change was most evident in deviations,
which were then significantly refactored.
diff --git a/src/validation.c b/src/validation.c
index f278cc6..8377fc1 100644
--- a/src/validation.c
+++ b/src/validation.c
@@ -172,7 +172,7 @@
             struct lyd_node_term *node = (struct lyd_node_term *)node_types->objs[i];
 
             /* validate and store the value of the node */
-            ret = lyd_value_parse(node, node->value.original, strlen(node->value.original), 0, 1, 0, format,
+            ret = lyd_value_parse(node, node->value.canonical, strlen(node->value.canonical), 0, 1, 0, format,
                                   prefix_data, *tree);
             LY_CHECK_RET(ret);
 
@@ -190,8 +190,8 @@
             struct lyd_meta *meta = (struct lyd_meta *)meta_types->objs[i];
 
             /* validate and store the value of the metadata */
-            ret = lyd_value_parse_meta(meta->parent->schema->module->ctx, meta, meta->value.original,
-                                       strlen(meta->value.original), 0, 1, 0, format, prefix_data, NULL, *tree);
+            ret = lyd_value_parse_meta(meta->parent->schema->module->ctx, meta, meta->value.canonical,
+                                       strlen(meta->value.canonical), 0, 1, 0, format, prefix_data, NULL, *tree);
             LY_CHECK_RET(ret);
 
             /* remove this attr from the set */