Server timeout thread.
Implemented automatic pinging.
Added missing PingThread class.