We want to add CoreInstance#doAsUser APIs allowing to log in the given user into framework and then open a CoreSession.
This API will leverage Framework#loginAs.
We should probably also handle the system user in order to replace usage such as below (code extracted from BAF scroller):
Furthermore, opening a system CoreSession with CoreInstance doesn't always logs in the framework whereas it should. This limitation has presented cases where UnrestrictedSessionRunner was inefficient because session was already unrestricted without an unrestricted login context.