Make the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.

Fixes #7335.