Mark functions as thread safe

Use attribute to mark some functions thread safe
that are falsely flagged as a problem by the static
analyzer.
Merge pull request #3700 from wddgit/multithreadCleanupTrack

Reco -- Mark functions as thread safe