Intrinsic frequency tuning of terahertz quantum-cascade lasers