atscppapi: fixes for TS-2651: race conditions in destruction of ...

...async providers.

Also, I noticed a duplicated lock while invoking an intercept plugin. Though the duplicate lock doesn't do any harm (mutex is recursive), we don't need it.