Denoising Score Matching with Random Features: Insights on Diffusion Models from Precise Learning Curves