parser xml CHANGE non-xml specific functions made separate

So that they can be used in other parsers and
even API functions. Some general refactoring included.
diff --git a/src/common.h b/src/common.h
index d8286b9..99f5ec6 100644
--- a/src/common.h
+++ b/src/common.h
@@ -435,6 +435,14 @@
 const char *json_print_get_prefix(const struct lys_module *mod, void *private);
 
 /**
+ * @brief ly_type_resolve_prefix implementation for JSON. For its simplicity, this implementation is used
+ * internally for various purposes.
+ *
+ * Implemented in parser_json.c
+ */
+const struct lys_module *lydjson_resolve_prefix(struct ly_ctx *ctx, const char *prefix, size_t prefix_len, void *parser);
+
+/**
  * @brief mmap(2) wrapper to map input files into memory to unify parsing.
  *
  * The address space is allocate only for reading.