Derives the berth identity for a session, falling back to the reserved
disconnected identity when there is no restored user/URL. Both the daemon
(writing its berth) and a surface (guarding against a duplicate, or attaching)
key on this so they always agree.
Parameters
user: string|null|undefined
The connected CUBE username, or null/undefined when disconnected.
cubeUrl: string|null|undefined
The connected CUBE URL, or null/undefined when disconnected.
Derives the berth identity for a session, falling back to the reserved disconnected identity when there is no restored user/URL. Both the daemon (writing its berth) and a surface (guarding against a duplicate, or attaching) key on this so they always agree.