Multi-state polarization switching and multifunction-integrated terahertz metadevice enabled by inverse resonance responses