Fix thread pool completed work item counter to remove finalized nodes (#57305)
* Fix thread pool completed work item counter to remove finalized nodes
- New nodes are being added to the set but finalized ones were not being removed
- This would result in double-counting the completed work item count for a thread that exits, and memory would grow over time
* Add a separate finalization helper for each node to track thread-local lifetimes
* Remove unnecessary IDisposable
* Fix nullability issues
* Update initialization of thread-local as suggested
Co-authored-by: Stephen Toub <stoub@microsoft.com>
Co-authored-by: Stephen Toub <stoub@microsoft.com>