MEDIUM: make the trash be a chunk instead of a char *

The trash is used everywhere to store the results of temporary strings
built out of s(n)printf, or as a storage for a chunk when chunks are
needed.

Using global.tune.bufsize is not the most convenient thing either.

So let's replace trash with a chunk and directly use it as such. We can
then use trash.size as the natural way to get its size, and get rid of
many intermediary chunks that were previously used.

The patch is huge because it touches many areas but it makes the code
a lot more clear and even outlines places where trash was used without
being that obvious.
diff --git a/src/frontend.c b/src/frontend.c
index 0adbf8d..652718c 100644
--- a/src/frontend.c
+++ b/src/frontend.c
@@ -163,26 +163,25 @@
 
 	if (unlikely((global.mode & MODE_DEBUG) && (!(global.mode & MODE_QUIET) || (global.mode & MODE_VERBOSE)))) {
 		char pn[INET6_ADDRSTRLEN];
-		int len = 0;
 
 		conn_get_from_addr(s->req->prod->conn);
 
 		switch (addr_to_str(&s->req->prod->conn->addr.from, pn, sizeof(pn))) {
 		case AF_INET:
 		case AF_INET6:
-			len = sprintf(trash, "%08x:%s.accept(%04x)=%04x from [%s:%d]\n",
-				      s->uniq_id, s->fe->id, (unsigned short)s->listener->fd, (unsigned short)cfd,
-				      pn, get_host_port(&s->req->prod->conn->addr.from));
+			chunk_printf(&trash, "%08x:%s.accept(%04x)=%04x from [%s:%d]\n",
+			             s->uniq_id, s->fe->id, (unsigned short)s->listener->fd, (unsigned short)cfd,
+			             pn, get_host_port(&s->req->prod->conn->addr.from));
 			break;
 		case AF_UNIX:
 			/* UNIX socket, only the destination is known */
-			len = sprintf(trash, "%08x:%s.accept(%04x)=%04x from [unix:%d]\n",
-				      s->uniq_id, s->fe->id, (unsigned short)s->listener->fd, (unsigned short)cfd,
-				      s->listener->luid);
+			chunk_printf(&trash, "%08x:%s.accept(%04x)=%04x from [unix:%d]\n",
+			             s->uniq_id, s->fe->id, (unsigned short)s->listener->fd, (unsigned short)cfd,
+			             s->listener->luid);
 			break;
 		}
 
-		if (write(1, trash, len) < 0) /* shut gcc warning */;
+		if (write(1, trash.str, trash.len) < 0) /* shut gcc warning */;
 	}
 
 	if (s->fe->mode == PR_MODE_HTTP)