ws: Forward "close" control messages properly to the bridge

These should be forwarded as the last message of that channel. Do
the session lookup before removing the channel from the table.

Closes #1610