High-speed operation of gain-switched midinfrared quantum cascade lasers