Change `VecMap`'s iterators to use wrapper structs instead of typedefs.

As mentioned in #19663, it is more desirable long-term that iterators be implemented as wrapper structs instead of typedefs.  This pull request converts `VecMap` to the preferred solution.
I'm in the process of adding DoubleEnded etc anyway, so I'll just squash these down while I'm in here!