wait() now has expected behavior (waits for all tasks to complete)
clean up empty threads using the active threads
Use a std::vector instead of std::list to hold worker threads