Active mode locking of quantum cascade lasers in an external ring cavity