Add the unsubscribe function to the javascript dispatcher class

Add a destroy function on the channel class of the javascript to allow
the client-side to unsubscribe to a channel.
fix on the destroy function of the channel js class