Physics study shows that sheep flocks alternate their leader and achieve collective intelligence