Meta: Switch to C++11 `for` loop usage (CMake code base)
This MR affects only those sources which belong to the CMake itself (decomposed from !1180 (closed)).
Changes done using clang-tidy
with some manual fine-tuning for vars naming.
Topic-rename: ranged-for
Edited by Brad King