Ultrashort pulse self-switching in coupled-semiconductor traveling-wave amplifiers