Fix logic of the stroke lifetime in QMic
We shouldn't try to end the same stroke multiple times. The patch also makes sure KisProcessingApplicator is owned by a scoped pointer instead of manual handling.
BUG:407520