[MEDIUM] make it possible to change the buffer size in the configuration

The new tune.bufsize and tune.maxrewrite global directives allow one to
change the buffer size and the maxrewrite size. Right now, setting bufsize
too low will block stats sockets which will not be able to write at all.
An error checking must be added to buffer_write_chunk() so that if it
cannot write its message to an empty buffer, it causes the caller to abort.
diff --git a/src/buffers.c b/src/buffers.c
index 55b7963..a20f3f4 100644
--- a/src/buffers.c
+++ b/src/buffers.c
@@ -17,6 +17,7 @@
 #include <common/config.h>
 #include <common/memory.h>
 #include <proto/buffers.h>
+#include <types/global.h>
 
 struct pool_head *pool2_buffer;
 
@@ -24,7 +25,7 @@
 /* perform minimal intializations, report 0 in case of error, 1 if OK. */
 int init_buffer()
 {
-	pool2_buffer = create_pool("buffer", sizeof(struct buffer) + BUFSIZE, MEM_F_SHARED);
+	pool2_buffer = create_pool("buffer", sizeof(struct buffer) + global.tune.bufsize, MEM_F_SHARED);
 	return pool2_buffer != NULL;
 }