Cast results of implementedEvents to an array.

This makes using mocks much easier with event listeners as they don't
need to provide a returnValue for implementedEvents.

Refs #2333