[ticket/13051] Fix viewonline event (recently broken) and add a new core event

https://tracker.phpbb.com/browse/PHPBB3-13051

This is a reversion of https://github.com/phpbb/phpbb/pull/2915 which simply destroyed this events usability.

PHPBB3-13051
Yes, in case the user needs to reference their values for any reason.