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.
8 files changed