Fixes#7517.
Cleans up the setDeviceType code which was attempting to set the device
type far too late in the init sequence, and moves responsibility for
detection from kmwembedded.ts to ios-host.ts, as this device test is
iOS-specific.
The iOS code was making a direct call to `keyman.core.resetContext()`
rather than to `keyman.resetContext()`. This meant that the
`OutputTarget` was not set and the `newContext` event would never be
called (as well as triggering a background warning in the language
processor "OutputTarget missing during an invalidateContext call").
Refactored to include a wrapper for `resetContext()` in ios-host.js, as
I think it's better to proxy all calls to KMW consistently through the
host javascript.
(There are a couple of other direct calls which could be cleaned up;
search for "evaluateJavaScript" to find all calls; I think we could
consider build a wrapper for all these calls?)
Relates to #949.
Mirror of #5349 (Android), for iOS.
* Adds setSpacebarText() API to Keyman Engine for iOS
* Adds displayName API to Keyman Engine for iOS
* Adds Preference for spacebar text to Keyman Engine for iOS
* Sets default spacebar text to keyboard name for FirstVoices Keyboards