libinput: Don't use events for capability detection

Instead of using events to detect the capabilities of a device check for
the capability relevant to us using libinput_device_has_capability(). It
is assumed that devices don't ever change capability.

Signed-off-by: Jonas Ådahl <jadahl@gmail.com>