Dynamics of Optical Frequency Combs in Ring and Fabry-Perot Quantum Cascade Lasers