* Refactor Relations to not be per-EventTimelineSet
* Fix comment and relations-container init
* Revert timing tweaks
* Fix relations order test
* Add test and simplify thread relations handling
* Fix order of initialising a room object
* Fix test
* Re-add thread handling for relations of unloaded threads
* Ditch confusing experimental getter `MatrixEvent::isThreadRelation`
* Fix room handling in RelationsContainer
* Iterate PR
* Tweak method naming to closer match spec
This changes the "relations created" event to ensure it is properly emitted even
if the target event is added to the timeline after the relation event. There was
perhaps always a risk of this happening in the past, but is seems more likely to
bite now with delayed decryption.
Part of https://github.com/vector-im/element-web/issues/17461
The `Relations` model was relying on object reference equality to prevent
duplicates, which breaks down if we ever have two objects that represent the
same event.
This fixes things to additionally track event IDs we've seen before and discard
any attempts to add them twice.
Fixes https://github.com/vector-im/element-web/issues/11161