A Frequency-Agile Terahertz Heterodyne Detector Based On Intersubband Transitions In Single Quantum Wells