LPS-51755 Refactor the ThreadLocal clear logic as a TestRule, and we sho...

...uld be fine to only clear our shortlived threadlocals