Collective periodicity in mean-field models of cooperative behavior