set CHANGE make ly_set* functions return LY_ERR values

unify ly_set* function that were returning -1 as error indicator
combined with positive value indicating index inside the set. The most
of other libyang functions return LY_ERR to indicate result. The problem
of these functions was also the limited range of the returned index.
While internally index is uint32_t, it was limited only to a positive
part of int type.
diff --git a/src/printer_json.c b/src/printer_json.c
index a0285b2..d002da1 100644
--- a/src/printer_json.c
+++ b/src/printer_json.c
@@ -96,7 +96,7 @@
 {
     /* leaf-list's content is always printed on a single line */
     ly_print_(ctx->out, "[%s", (!node->schema || node->schema->nodetype != LYS_LEAFLIST) && DO_FORMAT ? "\n" : "");
-    ly_set_add(&ctx->open, (void *)node, 0);
+    ly_set_add(&ctx->open, (void *)node, 0, NULL);
     LEVEL_INC;
 }