inet_* functions on Windows

Unfortunately, these headers are "interesting" on Windows. They
absolutely have to be included prior to <windows.h> which is included
from other system headers (nu surprise there). In some earlier version
of this patch this was not a problem, but I suspect that our
config.h-ification for the `LIBYANG_API_{DEF,DECL}` made stuff more
complex :(.

TL;DR: make sure that our "compat.h" goes in first, otherwise Bad
Things™ happen.
diff --git a/src/tree_data.h b/src/tree_data.h
index acbb7c2..24b9458 100644
--- a/src/tree_data.h
+++ b/src/tree_data.h
@@ -16,10 +16,15 @@
 #ifndef LY_TREE_DATA_H_
 #define LY_TREE_DATA_H_
 
-#include <arpa/inet.h>
-#if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
-#include <netinet/in.h>
-#include <sys/socket.h>
+#ifdef _WIN32
+# include <winsock2.h>
+# include <ws2tcpip.h>
+#else
+#  include <arpa/inet.h>
+#  if defined (__FreeBSD__) || defined (__NetBSD__) || defined (__OpenBSD__)
+#    include <netinet/in.h>
+#    include <sys/socket.h>
+#  endif
 #endif
 #include <stddef.h>
 #include <stdint.h>