Analysis of harmonic (sub) THz passive mode-locking in monolithic compound cavity Fabry-Perot and ring laser diodes