Ionization Balance for Optically Thin Plasmas: Rate Coefficients for all Atoms and Ions of the Elements H to Ni and implication for the calculated X-ray spectrum