Use pthread_atfork to clean the thread pool prior to forking