MSVC: handle symbol visibility

On MSVC, the exported symbols have to be marked both in the header and
in the implementation as dllexport, whereas on GCC the visibility=normal
attribute is only supposed to be used in the implementation. As a
result, we need two types of macros here, one for the public headers,
and the other for TUs with implementation. Also, the symbol name cannot
be generic ("API") because we only want to mark as dllexport those
symbols which are in a library that we're building *now*. Otherwise this
will break havoc in any libraries which also use the `ABI` macro *and*
also use libyang.
diff --git a/src/tree_schema_helpers.c b/src/tree_schema_helpers.c
index b6e3b7a..6340e1c 100644
--- a/src/tree_schema_helpers.c
+++ b/src/tree_schema_helpers.c
@@ -1246,7 +1246,7 @@
     return LY_SUCCESS;
 }
 
-API const struct lysc_when *
+LIBYANG_API_DEF const struct lysc_when *
 lysc_has_when(const struct lysc_node *node)
 {
     struct lysc_when **when;
@@ -1266,7 +1266,7 @@
     return NULL;
 }
 
-API const struct lys_module *
+LIBYANG_API_DEF const struct lys_module *
 lysc_owner_module(const struct lysc_node *node)
 {
     if (!node) {
@@ -1277,7 +1277,7 @@
     return node->module;
 }
 
-API const char *
+LIBYANG_API_DEF const char *
 lys_nodetype2str(uint16_t nodetype)
 {
     switch (nodetype) {
@@ -1310,7 +1310,7 @@
     }
 }
 
-API enum ly_stmt
+LIBYANG_API_DEF enum ly_stmt
 lys_nodetype2stmt(uint16_t nodetype)
 {
     switch (nodetype) {
@@ -1394,7 +1394,7 @@
     }
 }
 
-API const struct lysp_tpdf *
+LIBYANG_API_DEF const struct lysp_tpdf *
 lysp_node_typedefs(const struct lysp_node *node)
 {
     switch (node->nodetype) {
@@ -1417,7 +1417,7 @@
     }
 }
 
-API const struct lysp_node_grp *
+LIBYANG_API_DEF const struct lysp_node_grp *
 lysp_node_groupings(const struct lysp_node *node)
 {
     switch (node->nodetype) {
@@ -1459,7 +1459,7 @@
     }
 }
 
-API const struct lysp_node_action *
+LIBYANG_API_DEF const struct lysp_node_action *
 lysp_node_actions(const struct lysp_node *node)
 {
     struct lysp_node_action **actions;
@@ -1490,7 +1490,7 @@
     }
 }
 
-API const struct lysp_node_notif *
+LIBYANG_API_DEF const struct lysp_node_notif *
 lysp_node_notifs(const struct lysp_node *node)
 {
     struct lysp_node_notif **notifs;
@@ -1530,7 +1530,7 @@
     }
 }
 
-API const struct lysp_node *
+LIBYANG_API_DEF const struct lysp_node *
 lysp_node_child(const struct lysp_node *node)
 {
     struct lysp_node **child;
@@ -1648,7 +1648,7 @@
     }
 }
 
-API const struct lysc_node_action *
+LIBYANG_API_DEF const struct lysc_node_action *
 lysc_node_actions(const struct lysc_node *node)
 {
     struct lysc_node_action **actions;
@@ -1675,7 +1675,7 @@
     }
 }
 
-API const struct lysc_node_notif *
+LIBYANG_API_DEF const struct lysc_node_notif *
 lysc_node_notifs(const struct lysc_node *node)
 {
     struct lysc_node_notif **notifs;
@@ -1712,7 +1712,7 @@
     }
 }
 
-API const struct lysc_node *
+LIBYANG_API_DEF const struct lysc_node *
 lysc_node_child(const struct lysc_node *node)
 {
     struct lysc_node **child;
@@ -1762,7 +1762,7 @@
     }
 }
 
-API struct lysc_must *
+LIBYANG_API_DEF struct lysc_must *
 lysc_node_musts(const struct lysc_node *node)
 {
     struct lysc_must **must_p;
@@ -1808,7 +1808,7 @@
     }
 }
 
-API struct lysc_when **
+LIBYANG_API_DEF struct lysc_when **
 lysc_node_when(const struct lysc_node *node)
 {
     struct lysc_when ***when_p;