The only way for external components to activate an input source is by
setting the gsettings key. That's not optimal since external
components then have no way of knowing when exactly the switch is
completed.
This commit introduces a DBus method to set an input source and we
make sure to only return the method after all the changes have been
made, i.e. the XKB keyboard description has been changed and the IBus
engine (if any) has been activated.
E.g. gnome-shell can use this method and freeze keyboard events in the
X server until it hears back from g-s-d to ensure that events won't be
misinterpreted after an input source switch.