Added countdown tick based timers for retries, pings and timeouts.
 - Added basic cleaner function which executes every 20ms to check connection status.
 - Added several fields to ChannelState struct to properly support ticks etc.
 - Moved a few things around.