Tooling: Move heavyweight vectors around instead of copying.

While there convert to range-based for loops. No functionality change.