Fixes #281 by porting changes from iOS

https://github.com/couchbase/couchbase-lite-android/issues/281
Merge pull request #184 from couchbase/feature/issue_281_chan_remove

Fixes #281 by porting changes from iOS