The effect of stellar feedback and quasar winds on the active galactic nucleus population