The orbital diameter of primitive permutation groups