REORG: include: move common/buffer.h to haproxy/dynbuf{,-t}.h

The pretty confusing "buffer.h" was in fact not the place to look for
the definition of "struct buffer" but the one responsible for dynamic
buffer allocation. As such it defines the struct buffer_wait and the
few functions to allocate a buffer or wait for one.

This patch moves it renaming it to dynbuf.h. The type definition was
moved to its own file since it's included in a number of other structs.

Doing this cleanup revealed that a significant number of files used to
rely on this one to inherit struct buffer through it but didn't need
anything from this file at all.
diff --git a/include/types/applet.h b/include/types/applet.h
index ac7f38d..7b21f9a 100644
--- a/include/types/applet.h
+++ b/include/types/applet.h
@@ -23,13 +23,13 @@
 #define _TYPES_APPLET_H
 
 #include <haproxy/api-t.h>
+#include <haproxy/buf.h>
+#include <haproxy/dynbuf-t.h>
 #include <haproxy/freq_ctr-t.h>
 #include <types/hlua.h>
 #include <types/obj_type.h>
 #include <types/proxy.h>
 #include <types/stream.h>
-#include <common/buffer.h>
-#include <haproxy/chunk.h>
 #include <common/xref.h>
 
 struct appctx;
diff --git a/include/types/channel.h b/include/types/channel.h
index 863c3fb..d3823f2 100644
--- a/include/types/channel.h
+++ b/include/types/channel.h
@@ -23,7 +23,7 @@
 #define _TYPES_CHANNEL_H
 
 #include <haproxy/api-t.h>
-#include <common/buffer.h>
+#include <haproxy/buf-t.h>
 
 /* The CF_* macros designate Channel Flags, which may be ORed in the bit field
  * member 'flags' in struct channel. Here we have several types of flags :
diff --git a/include/types/compression.h b/include/types/compression.h
index fc2ad26..1604909 100644
--- a/include/types/compression.h
+++ b/include/types/compression.h
@@ -32,7 +32,7 @@
 #include <zlib.h>
 #endif
 
-#include <common/buffer.h>
+#include <haproxy/buf-t.h>
 
 struct comp {
 	struct comp_algo *algos;
diff --git a/include/types/sink.h b/include/types/sink.h
index 3feb05d..aad6ba7 100644
--- a/include/types/sink.h
+++ b/include/types/sink.h
@@ -23,8 +23,8 @@
 #define _TYPES_SINK_H
 
 #include <haproxy/api-t.h>
-#include <common/buffer.h>
 #include <import/ist.h>
+#include <haproxy/api.h>
 
 /* A sink may be of 4 distinct types :
  *   - file descriptor (such as stdout)
diff --git a/include/types/spoe.h b/include/types/spoe.h
index 42b4bd5..f08b9ad 100644
--- a/include/types/spoe.h
+++ b/include/types/spoe.h
@@ -24,7 +24,7 @@
 
 #include <sys/time.h>
 
-#include <common/buffer.h>
+#include <haproxy/dynbuf-t.h>
 #include <haproxy/list-t.h>
 #include <haproxy/thread.h>
 
diff --git a/include/types/ssl_sock.h b/include/types/ssl_sock.h
index 27633ec..ca41ffc 100644
--- a/include/types/ssl_sock.h
+++ b/include/types/ssl_sock.h
@@ -31,7 +31,7 @@
 #include <types/ssl_ckch.h>
 #include <types/ssl_crtlist.h>
 
-#include <common/buffer.h>
+#include <haproxy/buf-t.h>
 #include <haproxy/thread.h>
 #include <haproxy/list-t.h>
 #include <haproxy/openssl-compat.h>
diff --git a/include/types/stream.h b/include/types/stream.h
index 37bdb96..08e0f12 100644
--- a/include/types/stream.h
+++ b/include/types/stream.h
@@ -29,6 +29,7 @@
 #include <arpa/inet.h>
 
 #include <haproxy/api-t.h>
+#include <haproxy/dynbuf-t.h>
 #include <haproxy/list-t.h>
 
 #include <types/channel.h>
diff --git a/include/types/trace.h b/include/types/trace.h
index c119ab3..2114d41 100644
--- a/include/types/trace.h
+++ b/include/types/trace.h
@@ -23,7 +23,6 @@
 #define _TYPES_TRACE_H
 
 #include <haproxy/api-t.h>
-#include <common/buffer.h>
 #include <import/ist.h>
 #include <haproxy/list-t.h>
 #include <types/sink.h>