Meta: modernize old-fashioned loops to range-based `for` (CTest).
Decomposed from !1180 (closed)
Changes done via clang-tidy
with some manual fine-tuning
for the variable naming and auto
type deduction
where appropriate.
Topic-rename: ranged-for
Edited by Brad King