Analytical evaluation of atomic form factors: Application to Rayleigh scattering