Terahertz quantum cascade lasers with quasi-periodic resonators