Avoid accessing destroyed contexts in loop

Dispatch globally can cause certain events to close a view with bound context. This causes the destruction of the bound context. If this context has not yet been reached by the _.each loop that triggers the event on all contexts, an attempt will later be made to execute "context.vent.trigger" on a destroyed view and all further processing will abort on a "trying to access vent of undefined" error for that view.
code properly beautified
added missing semicolon
Added a test

to ensure that when contexts are all processed in sequence to trigger the event on each one, the destruction of a yet unprocessed context does not cause the program to attempt to trigger the event on it (as it no longer exists...) when the loop reaches it
Merge remote-tracking branch 'origin/patch-2' into patch-2
Merge pull request #55 from mmikeyy/patch-2

Avoid accessing destroyed contexts in loop