Fix drain logic in ThreadPoolExecutor (#5208)
Fix drain logic in ThreadPoolExecutor (#5208)

It seems that when `DrainAfterCancel` is set to true, the `ThreadPoolExecutor` will never return, which can cause some leak if for some reason the client or the silo is restarted without terminating the process
galvesribeiro/orleans,pherbel/orleans,yevhen/orleans,dotnet/orleans,benjaminpetit/orleans,jason-bragg/orleans,sergeybykov/orleans,ElanHasson/orleans,Liversage/orleans,amccool/orleans,yevhen/orleans,pherbel/orleans,jthelin/orleans,veikkoeeva/orleans,amccool/orleans,Liversage/orleans,ReubenBond/orleans,dotnet/orleans,amccool/orleans,galvesribeiro/orleans,hoopsomuah/orleans,ElanHasson/orleans,waynemunro/orleans,waynemunro/orleans,sergeybykov/orleans,Liversage/orleans,hoopsomuah/orleans,ibondy/orleans,ibondy/orleans