events: replaces EventGenerator::delegate with a factory function

I need the ability for the delegate to have some additional context, and not
be long lived. By creating a unique delegate for each EventGenerator there can
be context per EventGenerator.

BUG=615033
TEST=this is a test only change

Change-Id: I9d8e099b940426b19d11071a427186573caf6b06
Reviewed-on: https://chromium-review.googlesource.com/1192124
Reviewed-by: Sadrul Chowdhury <[email protected]>
Commit-Queue: Scott Violet <[email protected]>
Cr-Commit-Position: refs/heads/master@{#586840}
18 files changed