Compact groups from semi-analytical models of galaxy formation – I. A comparative study of frequency and nature