Current session restore logic didn't work correctly due to Kotlin initialization order (property initializes, init blocks, child/parent inheritance). The logic is extracted to a separate init block.
Added a test for the session restore logic.
Session-specific code is moved from coroutines to let it be executed synchronously and avoid possible data-race issues.
Some unnecessary code is removed (including previousSessionId property)
Fixed bug in InMemoryStorage - contains was used instead of containsKey
Checklist
[x] Does your PR title have the correct title format?
Summary
init
blocks, child/parent inheritance). The logic is extracted to a separateinit
block.previousSessionId
property)InMemoryStorage
-contains
was used instead ofcontainsKey
Checklist