Prevent re-entrancy while switching keyboards

This prevents a crash when the Keyman TSF Addin is enabled and the user
has assigned a TSF Addin layout to a writing system. Fixes LT-15288.

Change-Id: Ife13bfc1c5d770818c1fd7d3397b066191555934
Merge pull request #9 from sillsdev/feature/LT-15288

Prevent re-entrancy while switching keyboards (LT-15288)