Ratchet effect in the quantum kicked rotor and its destruction by dynamical localization