Add function to guess AF_UNSPEC address

Sometimes we receive generic "struct sockaddr" with unspecified (AF_UNSPEC)
address family. It's handy to try to guess
the proper address (there're just 2 variants ATM in most practical applications).

Use the added function to relax input checks in osmo_sockaddr_str_from_in*()

Related: OS#5581
Change-Id: I1c90c56ce832f53b65e0d18d3cea94621c02a69a
diff --git a/include/osmocom/core/sockaddr_str.h b/include/osmocom/core/sockaddr_str.h
index f474fa0..a46ad59 100644
--- a/include/osmocom/core/sockaddr_str.h
+++ b/include/osmocom/core/sockaddr_str.h
@@ -41,6 +41,7 @@
  */
 
 int osmo_ip_str_type(const char *ip);
+unsigned osmo_sockaddr_guess_unspec(const struct sockaddr *src);
 
 struct osmo_sockaddr_str {
 	/*! AF_INET for IPv4 address, or AF_INET6 for IPv6 address. */