RTC Slots: Refactoring of membership event parsing and handling (#5134)
* Split out membership into seperate files.
* First pass of merging in new changes.
* More cleanup
* fix import
* Lots of test fixes
* remove skips
* unrelated change
* docstring
* comment
* lint lint lint
* copyright updates
* cleanup
* Ensure we await initial membership in all tests.
* fix race
* Use promises which are more reliable
* Even more promise stability
* cleanup
* Cleanup
* rename legacy.ts -> session.ts
* Update imports
* cleanup
* Rename files
* Rename + remove claimed_
* renaming
* Rename function
* All the cleanup
* tidy
* commit changes
* fix call membership
* fix claimed
* update slot_id
* fix device_id / claimed_device_id
* Update src/matrixrtc/utils.ts
Co-authored-by: R Midhun Suresh <hi@midhun.dev>
* use an aggregate error
* Export types
---------
Co-authored-by: R Midhun Suresh <hi@midhun.dev>