Fix pressure curve widget being too sticky
Sometimes after lifting the pen last tablet event we get has very small
but non-zero pressure value, which causes the curve points to "stick" to
the pen when we want to test the pressure after setting them. Add a
small threshhold after which curve points no longer follow the pen.
Add some explicit floating point and int conversions.