A structural ensemble of a ribosome–nascent chain complex during cotranslational protein folding