Fixes #6035: Allows passing $params variable to Elgg event handlers

- [ ] add doc updates to accompany changes.