Hubble Space Telescope analysis of stellar populations within the globular cluster G1 (Mayall II) in M 31