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/xpath.c b/src/xpath.c
index f59cfe8..6001949 100644
--- a/src/xpath.c
+++ b/src/xpath.c
@@ -9008,7 +9008,7 @@
     return ret;
 }
 
-API const char *
+LIBYANG_API_DEF const char *
 lyxp_get_expr(const struct lyxp_expr *path)
 {
     if (!path) {