Linking folding dynamics and function of SAM/SAH riboswitches at the single molecule level