[MEDIUM] add internal support for IPv6 server addresses

This patch turns internal server addresses to sockaddr_storage to
store IPv6 addresses, and makes the connect() function use it. This
code already works but some caveats with getaddrinfo/gethostbyname
still need to be sorted out while the changes had to be merged at
this stage of internal architecture changes. So for now the config
parser will not emit an IPv6 address yet so that user experience
remains unchanged.

This change should have absolutely zero user-visible effect, otherwise
it's a bug introduced during the merge, that should be reported ASAP.
diff --git a/src/dumpstats.c b/src/dumpstats.c
index ed577ad..b04b297 100644
--- a/src/dumpstats.c
+++ b/src/dumpstats.c
@@ -2111,10 +2111,20 @@
 					chunk_printf(&msg, " title=\"IP: ");
 
 					/* IP */
-					if (inet_ntop(sv->addr.sin_family, &sv->addr.sin_addr, str, sizeof(str)))
-						chunk_printf(&msg, "%s:%d", str, htons(sv->addr.sin_port));
-					else
-						chunk_printf(&msg, "(%s)", strerror(errno));
+					switch (sv->addr.ss_family) {
+					case AF_INET:
+						if (inet_ntop(AF_INET, (const void *)&((struct sockaddr_in *)&sv->addr)->sin_addr, str, sizeof(str)))
+							chunk_printf(&msg, "%s:%d", str, htons(((struct sockaddr_in *)&sv->addr)->sin_port));
+						else
+							chunk_printf(&msg, "(%s)", strerror(errno));
+						break;
+					case AF_INET6:
+						if (inet_ntop(AF_INET6, (const void *)&((struct sockaddr_in6 *)&sv->addr)->sin6_addr, str, sizeof(str)))
+							chunk_printf(&msg, "%s:%d", str, htons(((struct sockaddr_in6 *)&sv->addr)->sin6_port));
+						else
+							chunk_printf(&msg, "(%s)", strerror(errno));
+						break;
+					}
 
 					/* id */
 					chunk_printf(&msg, ", id: %d", sv->puid);