Fixes memory leak when using reflection

References to Threads would be retained long after their termination if
reflection is used in them. This led to a steady, long memory leak in
applications using reflection in thread pools.
Merge pull request #4148 from SpinGo/issue/SI-8946

SI-8946: Fixes memory leak when using reflection