qml: MessageLine: Try harder catch key events
Make sure the key events are handled for the popup ONLy as long as the
popup is visible.
Before this patch, QML triggered the replaceWord() function even without
completion popup being visible, at times.