osmo_sock_init2: improve support for AF_UNSPEC

osmo_sock_init2 abstract two calls of getaddrinfo into one.
While there aren't problems with AF_INET or AF_INET6. When using
AF_UNSPEC there are corner cases when this fails. E.g. calling
local_host with "" and remote_host with an IPv6 only address results in
setting up a local socket with AF_INET while trying to connect from there towards
AF_INET6 will most likely fail.
To prevent such cases with AF_UNSPEC, search prio calling any syscalls if local and remote site
supports AF_INET or AF_INET6. In case both supported, prefer AF_INET6

Change-Id: I397c633931fd00d4f083955a3c49a40fb002d766
diff --git a/tests/socket/socket_test.err b/tests/socket/socket_test.err
index ed6e186..0f0f8da 100644
--- a/tests/socket/socket_test.err
+++ b/tests/socket/socket_test.err
@@ -1,2 +1,4 @@
 invalid: both bind and connect flags set: 0.0.0.0:0
 invalid: you have to specify either BIND or CONNECT flags
+Unable to find a common protocol (IPv4 or IPv6) for local host: 127.0.0.1 and remote host: ::1.
+Unable to find a common protocol (IPv4 or IPv6) for local host: ::1 and remote host: 127.0.0.1.