Modernize PrimaryVertexChecker
Follow up on !1925 (merged):
- prefer STL algorithms
- prefer range-based loops
- prefer standalone functions
- prefer fmt::format
- prefer const
- prefer auto
- prefer to directly initialize variables to their eventual value
Follow up on !1925 (merged):