Refactor around channels instead of locks.

This does not fully work yet and I'm not sure why.

For comment only...
@jvshahid Good call. I guess `|| err != nil` should trigger a reconnect.