Imaging trace gas concentrations with a compact snapshot device that converts their spectral features into a polarization signal