Add unit test for multi-user configuration loading

This adds a unit test for getting external storage configurations for multiple users in one session, like used in sharing on external storages. Originally there was a bug, fixed in #8293, so this should prevent any regressions.