Coherent Interaction of a Few-Electron Quantum Dot with a Terahertz Optical Resonator