Frequency and power stabilization of a terahertz quantum-cascade laser using near-infrared optical excitation.