ISPN-4446 Use thread local to signal cache removal to components

* Since stop() takes no parameters, the only way to get correct semantics of cache removal is to use a thread local variable.

I remember that there's a test that verifies that we do not use thread locals, but can't remember the exact reason for that. Regardless, I don't see any simpler solutions to this without having stop() methods in components take parameters, which would require some refactoring.