Infrared-finite algorithms in QED II. The expansion of the groundstate of an atom interacting with the quantized radiation field