Make event triggering pluggable.

This is a prerequisite for emberjs/ember.js#3091