events: Allow non-string event names

As crazy as it may sound, there are examples of this in the wild.

Since this is a locked portion of the API, we cannot introduce a
breaking change.