Creates a new channel, returning the Sender and LocalClosableReceiver. Each item T sent by the Sender
will only be seen once by the LocalClosableReceiver. Even if the Sender calls close while the LocalClosableReceivers buffer
is not empty, the LocalClosableReceiver will still yield the remaining items in the buffer until empty.
isolateChannel is used for bi-directional isolate communication. The returned
Sender and Receiver can communicate with the spawned isolate and
the spawned isolate is passed a Sender and Receiver to communicate with the original isolate.
Each item T sent by a Sender will only be seen once by the corresponding Receiver.
If the Sender calls close while the Receiver's buffer
is not empty, the Receiver will still yield the remaining items in the buffer until empty.
Types that can be sent over a SendPort, as defined here https://api.flutter.dev/flutter/dart-isolate/SendPort/send.html ,
are allow to be sent between isolates. Otherwise a toIsolateCodec and/or a fromIsolateCodec can be passed
to encode and decode the messages.