Dynamical evolution of the Oort cloud