Closes the channel.
If the channel has already been closed, this method does nothing.
Channels are automatically closed when they are freed.