Zeno and anti-Zeno effects for photon polarization dephasing