[FLINK-1217] Keepalive option should be set to sockets in Client and Server

Sockets in Client and Server is not set keepalive option.
I think we should set keepalive option to socket to detect hang or network disconnection.