Discrete Morse theory for cellular resolutions