Add thread safety testing in the CI
We should expand our testing in our CI to test for thread safety.
- It will need some annotation for parts that are not synchronized, but safe
- Both Helgrind and ThreadSanitizer should be used
Let's start by doing comparative tests on the release branches in the Jenkins CI, and build the tools to compare the TS and Helgrind results, and use those tools to have a GitLab CI job that would not allow regressions.