MINOR: chunks: Use dedicated function to init/deinit trash buffers

Now, we use init_trash_buffers and deinit_trash_buffers to, respectively,
initialize and deinitialize trash buffers (trash, trash_buf1 and trash_buf2).

These functions have been introduced to be used by threads, to deal with
thread-local trash buffers.
diff --git a/src/haproxy.c b/src/haproxy.c
index 30e850c..c27fca0 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -177,9 +177,6 @@
 
 static char *cur_unixsocket = NULL;
 
-/* this is used to drain data, and as a temporary buffer for sprintf()... */
-struct chunk trash = { };
-
 /* this buffer is always the same size as standard buffers and is used for
  * swapping data inside a buffer.
  */
@@ -1137,8 +1134,10 @@
 
 	next_argv = copy_argv(argc, argv);
 
-	chunk_init(&trash, malloc(global.tune.bufsize), global.tune.bufsize);
-	alloc_trash_buffers(global.tune.bufsize);
+	if (!init_trash_buffers()) {
+		Alert("failed to initialize trash buffers.\n");
+		exit(1);
+	}
 
 	/* NB: POSIX does not make it mandatory for gethostname() to NULL-terminate
 	 * the string in case of truncation, and at least FreeBSD appears not to do
@@ -2102,8 +2101,7 @@
 
 	cfg_unregister_sections();
 
-	free_trash_buffers();
-	chunk_destroy(&trash);
+	deinit_trash_buffers();
 
 	protocol_unbind_all();