Fix keyboard navigation in preview mode

Make it work even if the PreviewView widget is not in focus, and ensure
that it does not interfere with text input in the search bar.

To simplify the logic we have consolidated the code that deals with
key events in the searchbar and preview mode.

https://bugzilla.gnome.org/show_bug.cgi?id=726485