Diffusion, optimal transport and Ricci curvature