Optically Gated Terahertz-Field-Driven Switching of Antiferromagnetic CuMnAs