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.