Ion-molecule-reaction mass spectrometer for on-line gas analysis