MDL-45319 core_lib: set the relateduserid in the user_created/updated/deleted events
MDL-45319 events: added missing validation
MDL-45319 events: documented the additional validation