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/proto_tcp.c b/src/proto_tcp.c
index 21b1771..a1c69a2 100644
--- a/src/proto_tcp.c
+++ b/src/proto_tcp.c
@@ -625,7 +625,7 @@
 	 * and disable polling on this FD.
 	 */
 
-	conn->flags |= CO_FL_ERROR;
+	conn->flags |= CO_FL_ERROR | CO_FL_SOCK_RD_SH | CO_FL_SOCK_WR_SH;
 	__conn_sock_stop_both(conn);
 	return 0;
 }