This fixes #159 which is an issue on exiting selection mode.
This also slightly changes the logic for double click since with Qt5.12, double click now checks the distance of the two taps by default. The new logic makes sure the distance of the last release and the current press (press that triggered double click) are close. This avoids triggering double click when the first tap is actually a swipe.