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_data.h b/src/printer_data.h
index 650dacd..31cfc71 100644
--- a/src/printer_data.h
+++ b/src/printer_data.h
@@ -21,6 +21,10 @@
 #include "log.h"
 #include "tree_data.h"
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 struct ly_out;
 
 /**