Loosely related to the review of #31132 (review).
Problem
threadpool_tests currently stores a container-sized task count as int32_t in the range-submission test, then casts it back to size_t when sizing containers and checking future counts.
Some atomic declarations in the same file also use the longer std::atomic<T> spelling while nearby code uses the shorter standard typedefs.
Fix
Use size_t for the task count, generated range, task return type, and accumulators so the test stays in the same type domain as the containers it exercises.
Also switch the remaining simple atomic declarations in threadpool_tests to the matching standard typedefs such as std::atomic_int, std::atomic_bool, and std::atomic_size_t.