Unmount React components before stopping the client
This fixes an entire class of React soft crashes that can happen when you:
1. Log out, causing the client peg to become `null`
2. Some async process (event handler, timeout, request, etc.) tries to use the
client in a component before it unmounts, triggering a soft crash
3. Several moments later, the app actually unmounts
With this change, we change the app's view and unmount components first and then
after that we stop the client.
Fixes https://github.com/vector-im/riot-web/issues/11078