MEDIUM: connection: set the socket shutdown flags on socket errors

When we get a hard error from a syscall indicating the socket is dead,
it makes sense to set the CO_FL_SOCK_WR_SH and CO_FL_SOCK_RD_SH flags
to indicate that the socket may not be used anymore. It will ease the
error processing in health checks where the state of socket is very
important. We'll also be able to avoid some setsockopt(nolinger) after
an error.

For now, the rest of the code is not impacted because CO_FL_ERROR is
always tested prior to these flags.
diff --git a/src/stream_interface.c b/src/stream_interface.c
index 702e7b3..4600994 100644
--- a/src/stream_interface.c
+++ b/src/stream_interface.c
@@ -472,6 +472,7 @@
 				goto out_wait;
 			if (errno == EINTR)
 				continue;
+			conn->flags |= CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH;
 			goto out_error;
 		}