Re-implement channels

- Split input & output endpoints.
- Implement select.
- Decouple buffering from channels.
Implement simple spawn that can be used with channels.