Import Socket api into channels. Closes #411
Add Socket connection state hooks for browser client. Closes #405