Make the unit-test framework check RUST_TEST_TASKS over RUST_THREADS.

Fixes #7335.
auto merge of #8823 : huonw/rust/6233, r=brson

Fixes #7335.