Test: Properly shutdown thread pool