MDL-45319 core_lib: set the relateduserid in the user_updated and user_deleted events
MDL-45319 events: added missing validation
MDL-45319 events: documented the additional validation