Pulled out shared code between events and hooks into ElggPluginAPIService and added ElggEventService. Added tests for all.
Fixes #5147. Wired up ElggEventService.
Merge pull request #5159 from brettp/i5147_ElggEventService

Fixes #5147: Adds event service