Changes in setActorByName, refs #7327

- Stop saving IO inside the function
- Chech populated events and relations first
- Check relation and events for other IOs in the same repository after
Code clean-up, refs #7327