example.js: Fix syntax errors; call ChannelLeftBridge callback on channels

In addition to fixing some egregious and obvious syntax issues, this patch
also makes it so that the ChannelLeftBridge handler is called on a channel
leaving the bridge, as opposed to on the bridge itself. This allows for
safe destruction of the bridge when the channel count reaches 0. Previously,
the callback was called for each channel in the bridge when a channel left,
which would cause the application to attempt a bridge.destroy() more than
once.