Refactor _eventManager accessors to Cake\Event\EventManagerTrait

Addresses issue #3592
Use a single method to set and get EventManager.
Always returns an EventManager, if none was previously set.
Cake\Utility\ObjectRegistry is aware of an optional EventManager.
Each class extending ObjectRegistry will need to use the trait.

Explicitly assign and access EventManager via protected field

This avoids issues with unit tests that mock the whole class,
causing eventManager() to always return null;
Merge pull request #3601 from rhelms/issue-3592

Refactor _eventManager accessors to Cake\Event\EventManagerTrait