[core] Add ping timeout checking

When server sends us a ping, we reply. Before this commit, we relied on the
server to send us an error message to disconnect us if we timeout.

In many cases, Willie will not get this message from the server,
especially if the connection is out for more than few seconds.

This commit fixes this issue by making sure to disconnect if we don't get
pings in time.

It also adds a new config value, timeout, to set the ping timeout.
default is 60 seconds.