Put unsent tasks to other connections in the channel.

UT not finished.
Add UT for transfering unsent tasks.
Fix the bug in the UT
Fix the bug in timeout_loop.

Because the timeout_queue is only increasing, so I decrease it in the timeout_queue.