Polysymplectic reduction and the moduli space of flat connections