socket: multiaddr: Support IPv4 + IPv6 addresses in SCTP associations

The function is improved to support AF_INET:v4->v4, AF_INET6:v6->v6 and
AF_UNSPEC:v4+v6->v4+v6.
Unit tests for the function are added to make sure function behaves
correctly in several scenarios.

Change-Id: I36d8ab85d92bba4d6adb83bc1875eb61094ed2ef
diff --git a/tests/socket/socket_test.err b/tests/socket/socket_test.err
index 0f0f8da..3c5dac5 100644
--- a/tests/socket/socket_test.err
+++ b/tests/socket/socket_test.err
@@ -2,3 +2,11 @@
 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.
+invalid: you have to specify either BIND or CONNECT flags
+Invalid v4 vs v6 in local vs remote addresses
+Invalid v4 vs v6 in local vs remote addresses
+invalid: you have to specify either BIND or CONNECT flags
+Invalid v4 vs v6 in local vs remote addresses
+Invalid v4 vs v6 in local vs remote addresses
+getaddrinfo returned NULL: ::1:0: Transport endpoint is not connected
+getaddrinfo returned NULL: 127.0.0.1:0: Transport endpoint is not connected