Terahertz Functional Materials and Their Application in Metasurface Devices