MAJOR: get rid of fdtab[].state and use connection->flags instead

fdtab[].state was only used to know whether a connection was in progress
or an error was encountered. Instead we now use connection->flags to store
a flag for both. This way, connection management will be able to update the
connection status on I/O.
diff --git a/src/peers.c b/src/peers.c
index c12dcf6..e18b065 100644
--- a/src/peers.c
+++ b/src/peers.c
@@ -1152,6 +1152,7 @@
 	s->si[0].conn.peeraddr = NULL;
 	s->si[0].conn.peerlen  = 0;
 	s->si[0].conn.t.sock.fd = -1;
+	s->si[0].conn.flags = CO_FL_NONE;
 	s->si[0].owner = t;
 	s->si[0].state = s->si[0].prev_state = SI_ST_EST;
 	s->si[0].err_type = SI_ET_NONE;
@@ -1172,6 +1173,7 @@
 	s->si[1].conn.peeraddr = NULL;
 	s->si[1].conn.peerlen  = 0;
 	s->si[1].conn.t.sock.fd = -1; /* just to help with debugging */
+	s->si[1].conn.flags = CO_FL_NONE;
 	s->si[1].owner = t;
 	s->si[1].state = s->si[1].prev_state = SI_ST_ASS;
 	s->si[1].conn_retries = p->conn_retries;