Fixed possible race condition in Channel if to threads try to read at the same time.
Did some reorganization and fixed Channel's timeout read to update the timeout on successive waits.