Individual and social determinants of spontaneous group movements in cattle and sheep.