A time-dependent theory of resonant multiphoton ionization of atoms by short pulses. I. Weak-field results for the two-photon ionization of caesium