fix data races

Removed two data races, one from the use of ManualClock in testing and the other one from the fact that TLSConfig objects tend to be reused a lot.
After these fixes, I don't see any more data races.