May fix#4889.
In some situations, Keyman is unable to precisely match the user's
default language with its own keyboard settings. In this situation,
Keyman may crash when attempting to install the TIP, or may give a
spurious error such as "Too many transient languages" or similar.
I have been unable to reproduce the crash described in #4889 on my
machines so this is an attempted fix.
This does fix a bug with default languages in any case so is a good fix
to include: if the user's default language is not found in Keyman's LCID
table, then Keyman would fail to install the TIP when the keyboard is
installed and would return an error message (but not crash).
Fixes#3749.
Fixes#3759.
Adds a warning dialog when user attempts to add a transient language to
a keyboard but the maximum number of transient languages is already
installed.
If this issue arises when a user is installing a keyboard for the first
time, Keyman instead installs the keyboard for the user's default
language. This may be a little confusing, but the error condition is
difficult to explain and non-technical users will probably be stuck
and need to install under their default language in any case. Happy to
receive any pushback on this decision.
If the user does not specify a language in the bootstrap install,
then the package would be installed without any language selection.
Also, the elevated portion was doing a register and install instead
of just register.
This splits the registration and installation of TIPs according to the
elevation context during the installation process, so that the current
user gets the correct configuration, regardless of who the elevated user
is.