Mechanisms of oscillations and polyglot entrainment in neuronal and circadian models