Continuous-wave operation of terahertz quantum-cascade lasers