* src/threads/thread.cpp: Use a finalizer to remove dead threads.