input: fix touchscreen gesture detection
When a gesture is cancelled because of the distance between fingers or the time it took to register them all, no gesture has been taken yet. In that case, the canceling would never be ended, effectively disabling all touchscreen gestures.