Quenched fractions in the IllustrisTNG simulations: The roles of AGN feedback, environment, and pre-processing