free the gc_thread structures during shutdown