Switch to HepMC3/HepMC2 compatible loops part 2
In this MR:
- implemented trivial HepMC::begin(HepMC::GenEvent) HepMC::end(HepMC::GenEvent) variations for looping over particles in the event. The HePMC3 counterparts are in another MR.
- used C++11/14 loops to loop over particles in the event.
As a result, the code is independent of the HepMC version.
This MR is a continuation of the !33580 (merged)
Andrii