Added tryWriteChan and tryReadChan functions, for reads and writes which do
not block when a channel is empty or full.