Update channel.js

fixed close logic.  this should allow channels to get cleaned up.
Merge pull request #26 from jonasi/master

Fix channel memory leak.