mainIdentity is a fundamentally broken idea
Summary: We're using the convenient concept of mainIdentity
in more and more places in the code. But it really doesn't make sense -- if I have a FB login and a direct Querki login, which one is "main"? I suspect we're getting into trouble here.
This is not a critical priority yet, since we don't yet have unified Users, and probably won't for at least a while. But we should figure this out well before we try to unify Identities.
I suspect that we need a "UserAndIdentity" abstraction to pass around, that means "I'm talking about this specific IdentityId
within this User".