[TIMOB-13253] Check for listeners before firing events

Resolves [TIMOB-13253](https://jira.appcelerator.org/browse/TIMOB-13253)

This is a basic fix which I am comfortable backporting to 3_1_X. A more detailed PR which cleans up the eventing system will follow later. Will be attached to the eventing experiment ticket.