searchbar: Simiplify key handling logic

Adjust the check for detecting keyboard navigation events so that it
does not eat up accelerators like Ctrl+Q.

This keeps the code in sync with gnome-documents.
main: Locale fix

Ensure that each part of the locale is set according to the current
environment variables. Otherwise we leave ourselves open to locale
mismatches between the Tracker database and the application.

This can lead to the DB's locale changing on start; or failure to use
Tracker's 'direct' backend and falling back to 'bus'.

We were quite reliably hitting this problem when running the test
suite.