wayland: Minor refactor

We use the input_method on both branches, but only check for its existence
when enabling the text_input. The case of focusing out shouldn't happen in
practice as we couldn't have focused in ever before, but still make the
check one level above so it's clearer that the text_input's IM focus cannot
be enabled without an IM implementation.

!432
3 jobs for !432 with wip/carlosg/no-toggle-panel-across-focus in 4 minutes and 4 seconds (queued for 2 seconds)
detached
Status Job ID Name Coverage
  Review
passed #235122
check-commit-log

00:00:38

 
  Build
passed #235123
build-mutter

00:01:27

 
  Test
passed #235124
test-mutter

00:01:58