Couple of fixes in ThreadPool: properly delete Search instances on thread
exit. Fix pool resize.