Follow permalinks to and from threads (#5414)
* Implement navigation to event inside a thread when a permalink is used
* Fix permalink navigation in threads to rooms
* Fix navigating to a different thread from a permalink in an existing thread
* Fix tests
* Add missing tests for thread navigation
* Reduce number of diff between ThreadedMessagesNode.kt and MessagesNode.kt
* Navigate back to the room when a link to the current room is clicked in a thread.
---------
Co-authored-by: Benoit Marty <benoitm@element.io>
Co-authored-by: Benoit Marty <benoit@matrix.org>