Thread shutdown works good.

Fix leaking Handles caused by fast thread, which deleted the thread data, make handle info lost. Now the handles will be also delete at thread end by thread it self, no leak any more.