Possibly fix freeze on painting when using weird tablet drivers
Some tablet drivers (Lenovo Yoga on Linux) have a bug [0] when the stylus
changes its own ID right in the middle of the stroke/hovering. Sometimes
they also generate spurious tabler press/release events. In Krita
such behavior may lead to recursive tool switching right in the middle
of TabletPress processing. Which could lead to a stroke started twice,
which basically leads to a freeze.
[0] - https://github.com/linuxwacom/input-wacom/issues/66#issuecomment-463349786
CCBUG:410797