Previously, to figure out if it was possible to resolve a keyserver session invalidation, we were checking for the presence of the resolveInvalidatedCookie function.
That function was missing on web but present on native, since it required native credentials to work.
Now we can attempt resolution for any client that is usingCommServicesAccessToken, so we want to update the check. Instead of duplicating the code, I introduced a function to handle the check.
Depends on D10577
This logic is a bit confusing.
I guess the reason we decided to store a separate deviceToken per keyserver is because we want to know if we've shared our deviceToken to that keyserver yet, not because we expect to have a different deviceToken per keyserver.
It would probably make more sense if we have a deviceTokenHasBeenUploaded: boolean in KeyserverInfo, and a deviceToken field at the top level of Redux. But we'll likely end up removing deviceTokens from keyservers soon anyways...