touchpad: Make tap code follow state machine diagram part 1
According to the diagram, we should only check the tap-touch-state before
sending a button press / release when in state touch_2 or touch_3.
tp_tap_notify always checks the tap-touch-state. This is problematic when in
state tapped, or one of the follow up states, since this could cause the
button 1 release to never happen.
In practice this is never a problem since the touch passed into tp_tap_notify
is NULL when called for timeout or button events, and in the 2 affected paths
where we're dealing with a touch or release tap-touch-state always is
TAP_TOUCH_STATE_TOUCH.
However we should not rely on this and properly follow the diagram, this
commit therefor drops the touch argument to tp_tap_notify, and adds explicit
tap-touch-state checks in the places where they are present in the diagram too.
Signed-off-by: Hans de Goede <hdegoede@redhat.com>