MDL-45319 events: set the relateduserid when triggering the user_created/updated/deleted events
MDL-45319 events: added debugging messages for missing relateduserid value
MDL-45319 events: added missing validation
MDL-45319 events: documented the additional validation