Make XXXEventListener as friend class of XXXEvent. Move the test of eventdispatchertest.
Merge pull request #3695 from dumganhar/iss2087-new-event-dispatcher

Make XXXEventListener as friend class of XXXEvent. Move the test of eventdispatchertest.