Fix injection when accessing other sessions (#14626)

When accessing UIScoped beans of other sessions, use the correct
session identifier when available instead of current session.
Use identifiers instead of session instances as map keys.

Change-Id: Id7b1eb62eee3943e6eb59ff8c051ddfca589567e