A non-local thermodynamic equilibrium radiative transfer model for infrared emissions in the atmosphere of Mars: 1. Theoretical basis and nighttime populations of vibrational levels