Move channel-related methods to the channel class

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Fix tests to use the updated API

Signed-off-by: Claudio Matsuoka <cmatsuoka@gmail.com>
Revert "Move channel-related methods to the channel class"

This reverts commit 1addab343f123d0ab0a853891f5ba3545408b5c4.