Real-time redox measurements during endoplasmic reticulum stress reveal interlinked protein folding functions