libinput: Only forward first and last press and release for a key
libinput: Only forward first and last press and release for a key

Keyboard key events will be received from a device where a key has
been pressed, even though an equivalent key has been pressed (same
key code) on a device connected to the same seat. notify_key()
expects to only be called as if there was only one keyboard device
associated with the given seat, so to achieve this, ignore every event
where forwarding it would result in multiple 'pressed' or 'released'
notifications.

Signed-off-by: Jonas Ådahl <67dcd8a17e758192e0cbb577ce1d62cc7da6cf49@gmail.com>
Reviewed-by: Peter Hutterer <b9c50af7afa7642f6f854434cda9ffe54ece8b85@who-t.net>
Reviewed-by: Daniel Stone <62e7e355d5d8400fa8384448796af0bf6be4ffae@collabora.com>
Reviewed-by: Derek Foreman <2f97e0f0bc172406aab8ccd42dab54c95bab8759@osg.samsung.com>

sir-murray/weston,Fantu/compositor-spice,giucam/weston,jonnylamb/weston,Gnurou/weston,krezovic/weston,udoprog/weston,kwm81/weston,mchalupa/weston,mchalupa/weston,giucam/weston,eyolfson/weston,Fantu/compositor-spice,udoprog/weston,sir-murray/weston,jonnylamb/weston,xorgy/weston,kwm81/weston,xorgy/weston,Tarnyko/weston-xdg_surface_present,krezovic/weston,Gnurou/weston,eyolfson/weston,Fantu/compositor-spice,Tarnyko/weston-xdg_surface_present