Convergence to a ground state as a threshold phenomenon in nonlinear parabolic equations