A CMOS THz Staring Imager with In-pixel Electronics