Forget the session locally (after logout, or when the server rejected the refresh token).
A valid access token, refreshing first if it expires within the margin (or force).
Loads a stored session (e.g. at app start). Returns null when signed out.
Single-flight refresh: concurrent callers share one request.
Moves a session set aside back. False when key holds none.
Moves the session to key without ending it (SPEC §21). A refresh under way finishes first, so the
token that moves is the newest. Written before it is deleted: a crash between the two leaves both,
and the active key wins. False when there is no session to move.
After login/register: keep the session and its first access token.
Changes fields of the stored session, e.g. the email after it changed (SPEC §16).
The access token held now, if it hasn't expired, without refreshing.