[core] improve rawlog

Improve the raw connection log to ease debugging by indicating which lines are line we got, and which are lines we sent
[core] improve ping and timeout handling

We should reset the timer on every recived message, because if we got a message the connection is working.
Also, 60s is too low, so I doubled it.
Some servers send pings in much larger intervals, so we should send pings ourselves if we didn't recive anything in a while