Profiles and optimised EventManager::listeners() function, reducing execution time by 14.5%

Refs #2105
Added EventManager::prioritisedListeners() function to alow the global event manager to return unprocessed listeners array

Refs #2105
Removed EventManager test that tested using a closure as it breaks compatability with php < 5.3.0

Refs #2105
Corrected coding standards violations in CateEventMAnagerTest.pnp

Refs #2105
Corrected coding standards violations in CaKeEventManagerTest.php

- Changed combining of arrays in CakeEventManager::listeners() to be more efficient

Refs #2105
Restore global event managers that were causing cascading failures.

Refs #2105
Merge branch 'ticket-4059' into 2.5

Merge the changes from pull request #1638 into 2.5.

This set of changes combines the listeners from the global and local
event managers into one ordered set of listeners. This makes the
cognitive load lower around events, as there are no longer two separate
priority queues for the global and local managers.

Closes #2105