Bug 1097450 - Save (to settings) the activeLayout of groups supported by one layout, when we change to that layout

- Also, properly define the undefiness of activeLayout in InputLayout's layouts.
Because of boot-up time limitation, we do not use mozSettings to get settings record anymore. Please use `SettingsCache.get(callback);` to do the same thing. One mozSettings.get may cost 500ms.