headers MAINTENANCE headers/include cleanup

- add missing extern "C" in some of the public headers for use in C++
- includes cleanup and fix ordering
diff --git a/src/tree_schema.c b/src/tree_schema.c
index 7bafc82..f15340a 100644
--- a/src/tree_schema.c
+++ b/src/tree_schema.c
@@ -14,12 +14,11 @@
 
 #define _GNU_SOURCE
 
-#include "common.h"
+#include "tree_schema.h"
 
 #include <assert.h>
 #include <dirent.h>
 #include <errno.h>
-#include <fcntl.h>
 #include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
@@ -27,16 +26,17 @@
 #include <sys/stat.h>
 #include <unistd.h>
 
+#include "common.h"
 #include "context.h"
 #include "dict.h"
 #include "log.h"
-#include "set.h"
-#include "xpath.h"
-#include "plugins_exts.h"
-#include "tree.h"
-#include "tree_schema.h"
-#include "tree_schema_internal.h"
+#include "parser.h"
 #include "parser_internal.h"
+#include "parser_schema.h"
+#include "set.h"
+#include "tree.h"
+#include "tree_schema_internal.h"
+#include "xpath.h"
 
 API const struct lysc_node *
 lys_getnext(const struct lysc_node *last, const struct lysc_node *parent, const struct lysc_module *module, int options)