Shutdown thread pool when server stops.