Fix for-range loops that can use iterators

Search out loops similar to `for .. range(0, v.len())` and use iterators directly.

All the `.each_*` methods in smallintmap fell afoul of this, and since these are obsolete due to `.iter()` and `.mut_iter()`, those are simply removed.

Fixes #7372