Ranged for

`for (Iter i = c.begin(); i != c.end(); ++i)` is long, noisy,
and the extra capabilities of iterators over a simple foreach
are mostly not needed.

`make check` and `make -C testsuite-real` are happy with
the changes, still this could use a combover from someone
with OCD.  or better, a run of the acceptance tests.

@k0da, @kobliha
How about ```unsigned long long smallestK = sizes.empty() ? 0 : *min_element(sizes.begin(), sizes.end());```?