Photonic simulation of parafermionic Berry-phase statistics and contextuality