Do not show the legacy UI if it was already initialized before

If a LegacyEnvironment was initialized in headless mode, we should
not show the legacy UI when the initializer is run.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Make the SwitchToModernTest more robust

The legacy environment we use for testing to resemble a 'real' legacy
environment as much as possible.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Merge branch 'switch-to-modern-test'

Some cosmetic fixes to the unit test verifying that Switch To Modern
Mode works as expected.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>