Gevrey regularizing effect for the (generalized) Korteweg-de Vries equation and nonlinear Schrödinger equations