fix for TS-2779 (atscppapi: bug in AsyncTimer - cancel results in crash)

The fix is that in cancel() we remember this fact and use it to check cancel retry.