tools: make event-debug's option parsing more flexible

We need to be able to turn config options on/off for testing, so switch to
something that's a bit more flexible than characters that represent the
options.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools: add --enable-tap to event-debug

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools: move option parsing to a helper library

event-debug and event-gui can and should share this

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools: move opening the backend to the shared lib too

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools: move applying device configuration to shared lib

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools: add support to enable/disable natural scrolling

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools: add support for enabling/disabling left-handed button mappings

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
tools: use the new shared lib from event-gui

This gives the event gui the ability to use the path backend, and any
configuration toggles given on the commandline.

Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>