Don't crash if there are no ibus keyboards installed (FWNX-1382)

If IBus is running but there are no ibus input methods listed in
the IBus Preferences we shouldn't try to set an ibus keyboard. This
might actually fix FWNX-1382.

This is an improved version of the previous reverted commit.
The additional changes will hopefully allow the tests to pass on TC.