[MINOR] make use of addr_to_str() and get_host_port() to replace many inet_ntop()

Many inet_ntop calls were partially right, which was hard to detect given
the complex combinations. Some of them were relying on the listener's proto
instead of the address itself, which could have been different when dealing
with an accept-proxy connection.

The new addr_to_str() function does the dirty job and returns the family, which
makes it particularly suited to calls from switch/case statements. A large number
of if/else statements were removed and the stats output could even be cleaned up
in the case of session dump.

As a side effect of doing this, the resulting code is smaller by almost 1kB.
All changed parts have been tested and provided expected output.
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 8a04f16..913e04e 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -589,18 +589,8 @@
 	if (msg && errlen) {
 		char pn[INET6_ADDRSTRLEN];
 
-		if (listener->addr.ss_family == AF_INET) {
-			inet_ntop(AF_INET,
-				  &((struct sockaddr_in *)&listener->addr)->sin_addr,
-				  pn, sizeof(pn));
-			snprintf(errmsg, errlen, "%s [%s:%d]", msg, pn, ntohs(((struct sockaddr_in *)&listener->addr)->sin_port));
-		}
-		else {
-			inet_ntop(AF_INET6,
-				  &((struct sockaddr_in6 *)(&listener->addr))->sin6_addr,
-				  pn, sizeof(pn));
-			snprintf(errmsg, errlen, "%s [%s:%d]", msg, pn, ntohs(((struct sockaddr_in6 *)&listener->addr)->sin6_port));
-		}
+		addr_to_str(&listener->addr, pn, sizeof(pn));
+		snprintf(errmsg, errlen, "%s [%s:%d]", msg, pn, get_host_port(&listener->addr));
 	}
 	return err;