Refactor app module lose/gain focus behaviour.
Previously, app module lose/gainFocus events and triggers occurred in an indeterminate order. Now, they occur ordered from the outermost app module for gain focus and the innermost app module for lose focus.
Also, all trigger exits and enters occur between the loseFocus and gainFocus events. This means that they can be optimised so that the profile switch is only handled once, which may be a lot faster because it can eliminate redundant synth/braille display switching.
ConfigManager.atomicProfileSwitch was added to facilitate the switching optimisation.