Backported annotation event dispatcher enhancements to 6.x branch.

Event dispatcher enhancements that were originally created for 7.x but nothing in the functionality was specific to 7.0.  This is the backport.