Bug 1097450 - In KeyboardManager, properly save the activeLayout of groups supported by one layout, when we do the counterpart in InputLayouts

- Also, properly define the undefiness of activeLayout in InputLayout's layouts.
If ``currentActiveLayoutIdx`` is undefined then we'd launch the 0-th layout, i.e. bug 1048228 UX spec fails.