Wide dynamic range terahertz detector pixel for active spectroscopic imaging with quantum cascade lasers