Ultrafast imaging of terahertz electric waveforms using quantum dots