CLEANUP: includes: fix includes for a number of users of fd.h

It appears that fd.h includes a number of unneeded files and was
included from standard.h, and as such served as an intermediary
to provide almost everything to everyone.

By removing its useless includes, a long dependency chain broke
but could easily be fixed.
diff --git a/include/common/standard.h b/include/common/standard.h
index e7c5ebd..511a1dd 100644
--- a/include/common/standard.h
+++ b/include/common/standard.h
@@ -26,10 +26,10 @@
 #include <string.h>
 #include <time.h>
 #include <sys/types.h>
+#include <sys/un.h>
 #include <netinet/in.h>
 #include <common/config.h>
 #include <eb32tree.h>
-#include <proto/fd.h>
 
 #ifndef LLONG_MAX
 # define LLONG_MAX 9223372036854775807LL
diff --git a/include/proto/connection.h b/include/proto/connection.h
index 43f02d7..3ed605f 100644
--- a/include/proto/connection.h
+++ b/include/proto/connection.h
@@ -24,6 +24,7 @@
 
 #include <common/config.h>
 #include <types/connection.h>
+#include <types/protocols.h>
 
 /* I/O callback for fd-based connections. It calls the read/write handlers
  * provided by the connection's sock_ops. Returns 0.
diff --git a/include/proto/signal.h b/include/proto/signal.h
index ef43ef9..6556446 100644
--- a/include/proto/signal.h
+++ b/include/proto/signal.h
@@ -14,6 +14,7 @@
 #include <signal.h>
 #include <common/standard.h>
 #include <types/signal.h>
+#include <types/task.h>
 
 extern int signal_queue_len;
 extern struct signal_descriptor signal_state[];
diff --git a/include/types/fd.h b/include/types/fd.h
index 1ccb0eb..1c44329 100644
--- a/include/types/fd.h
+++ b/include/types/fd.h
@@ -22,14 +22,8 @@
 #ifndef _TYPES_FD_H
 #define _TYPES_FD_H
 
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/types.h>
-#include <unistd.h>
-
 #include <common/config.h>
-#include <types/task.h>
-#include <types/protocols.h>
+#include <types/port_range.h>
 
 enum {
 	DIR_RD=0,
diff --git a/include/types/sample.h b/include/types/sample.h
index 2f5ce86..bc1aad2 100644
--- a/include/types/sample.h
+++ b/include/types/sample.h
@@ -27,6 +27,7 @@
 #include <netinet/in.h>
 
 #include <common/chunk.h>
+#include <common/mini-clist.h>
 #include <types/arg.h>
 
 /* input and output sample types */
diff --git a/src/connection.c b/src/connection.c
index cb314ad..748e14e 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -14,6 +14,7 @@
 #include <common/config.h>
 
 #include <proto/connection.h>
+#include <proto/fd.h>
 #include <proto/proto_tcp.h>
 #include <proto/session.h>
 #include <proto/stream_interface.h>
diff --git a/src/proto_tcp.c b/src/proto_tcp.c
index 3773144..b43731c 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -41,6 +41,7 @@
 #include <proto/arg.h>
 #include <proto/channel.h>
 #include <proto/connection.h>
+#include <proto/fd.h>
 #include <proto/log.h>
 #include <proto/port_range.h>
 #include <proto/protocols.h>
diff --git a/src/sample.c b/src/sample.c
index aec94fe..3703a44 100644
--- a/src/sample.c
+++ b/src/sample.c
@@ -13,6 +13,7 @@
 
 #include <string.h>
 #include <arpa/inet.h>
+#include <stdio.h>
 
 #include <common/chunk.h>
 #include <common/standard.h>
diff --git a/src/session.c b/src/session.c
index c4323da..3c47937 100644
--- a/src/session.c
+++ b/src/session.c
@@ -28,6 +28,7 @@
 #include <proto/checks.h>
 #include <proto/connection.h>
 #include <proto/dumpstats.h>
+#include <proto/fd.h>
 #include <proto/freq_ctr.h>
 #include <proto/frontend.h>
 #include <proto/hdr_idx.h>
diff --git a/src/standard.c b/src/standard.c
index 0af7c95..e7bc070 100644
--- a/src/standard.c
+++ b/src/standard.c
@@ -13,6 +13,7 @@
 #include <ctype.h>
 #include <netdb.h>
 #include <stdarg.h>
+#include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
 #include <sys/socket.h>