Support a touch being pressed and released on the same frame

Implemented as discussed, turned out to be tricky though :)
Added and tweaked some tests to test it properly.

Fixes #2838
(also ignored ncrunch files, they are autogenerated)