Terahertz Sensor Using Photonic Crystal Cavity and Resonant Tunneling Diodes