CTest: create one output file per memcheck (#14303)

The output file used for memory checker runs must be unique for every test run
in parallel, so simply make them unique for every test run. Simply use the test
index to avoid collisions.
Merge topic 'parallel-memcheck' into next

6f9aaad CTest: create one output file per memcheck (#14303)