Fix assert and a data-loss in Transform Tool
The patch rewrites the logic of transform stroke completion. Previously,
the decision whether to cancel transformation or to recover continued
state was done by the GUI thread. It cased troubles, because the user
could press esc/enter keys too quickly, even before the stroke was
actually initialized (and before sigTransactionGenerated() was received).
It caused confsion, resulting in the loss of the data of the continued
Now GUI thread doesn't worry about the continued state. All the decisions
are done by the stroke itself, so no races should happen.