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/printer_schema.c b/src/printer_schema.c
index aba842e..df14f21 100644
--- a/src/printer_schema.c
+++ b/src/printer_schema.c
@@ -12,14 +12,16 @@
  *     https://opensource.org/licenses/BSD-3-Clause
  */
 
+#include "printer_schema.h"
+
 #include <stdio.h>
 #include <unistd.h>
 
 #include "common.h"
 #include "config.h"
 #include "log.h"
+#include "printer.h"
 #include "printer_internal.h"
-#include "printer_schema.h"
 #include "tree_schema.h"
 
 API ssize_t