Curvature of differentiable Hilbert modules and Kasparov modules