Replace old iterator `for` with `do { .. }` expressions in std and extra

Where the code still uses old style internal iterators together with `for`, replace the iterations with `do` expressions. This helps get the old fors out of the way for future for syntax changes.

Do this except for (of course) where we use `.advance()`, and not where we use any `::range( .. )` function.