A Dual-Frequency THz Oscillator Based on a Dual-Layer Cascaded Grating Structure