Add basic connection Deadlines to the recvLoop and sendLoop

Also, make the ping interval half of the timeout interval instead of a fixed 10 seconds.