Noise resistant synchronization and collective rhythm switching in a model of animal group locomotion