Resonant nature of phonon-induced damping of Rabi oscillations in quantum dots