Nonlinear transmission-line model of an FET terahertz detector for arbitrary gate voltage