Added a destructor to villager to terminate the threads.