several CHANGE code refactoring

All functions return EXIT_ constants
onstead numbers. Unres structure renamed.
diff --git a/src/printer/json.c b/src/printer/json.c
index 74d375a..1cd69c2 100644
--- a/src/printer/json.c
+++ b/src/printer/json.c
@@ -81,7 +81,7 @@
 {
     const char *ptr, *print_ptr;
     int cur_id_len, print_id_len;
-    struct leafref_instid *nodes, unres;
+    struct unres_data *nodes, unres;
     struct lys_module *prev_module = NULL, *cur_module;
     struct lys_node *snode;