olm 1.0.0 made broken OlmAccounts, which we may be unable to restore with olm
1.1.0. Add some words to that effect, and make sure we clear the localstorage.
Get rid of MatrixClientPeg.replaceUsingUrls, and instead create local,
temporary MatrixClients for the unauthed steps; we therefore only use
MatrixClientPeg for logged-in clients.
move the logic for handling login tokens into Lifecycle.loadSession
This means it needs access to the (real) query parmeters, so it depends on
corresponding changes in vector-web.
Make sure that we use the homeserver from localstorage for guest regsistration,
in preference to the default.
Also rename the parameters for loadSession
Don't clear localstorage when replacing the client: we clear it when logging out so this is just redundant, and since we now use replaceClient to unpickle a session from localstorage, this was blowing away all our setting on every refresh.
Also Move all of the localstorage code to Lifecycle (except device ID but this will probably be generated on the server soon anyway). We previously cleared localstorage on logout in Lifecycle so persist the session in Lifecycle.setLoggedIn() to be symmetrical.
This means that we don't create a spurious MatrixClient which is thrown away by
the SessionLoader (whilst still ensuring that the rehydrated matrixclient
follows the same code path as matrixclients created at other points in the
session load process).
Take some of the magic out of MatrixChat.componentDidMount() into a new
component.
Also delete the MatrixChat test. It wasn't really doing much, is broken by the
change, and I am replacing it with (better) app-level tests in the vector
project.
Also try to refactor some of the login/logout code out of MatrixChat and into a separate Lifecycle.js. This still isn't great, but it at least gets some code out of MatrixClient.