Lineshapes and optical selectivity in high-resolution double-resonance ionization mass spectrometry