Rare earth single-ion anisotropy and the magnetic structures of the RTiO3 perovskites: R = Tb, Dy, Ho, Er and Tm