app: Fix CTRL+Q and ALT+A handling

For some reason we were doing:

event.state & Gdk.ModifierType.MODIFIER_MASK == TARGET_MASK

while Gdk.ModifierType.MODIFIER_MASK should not be involved:

event.state & TARGET_MASK != 0

This change fixes the regression of CTRL+Q and ALT+A not working against
recent Gtk+.

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