changed keep_alive algorithm to work perfect

1. Changed keep_alive_check algorithm in server/start.c, which would
   sleep a bit longer to eliminate network dealy effect, and check if
   the timestamp has been changed instead of checking if the time span
   is longer than a specified interval.

2. Added SIGPIPE signal handler to client/start.c to avoid client exit
   without any cleanup.

Signed-off-by: Hongyi Jia <Hongyi.Jia.GR@dartmouth.edu>