Gain-switched semiconductor lasers with pulsed excitation and optical injection for dual-comb spectroscopy