Functional reorganisation of the cranial skeleton during the cynodont–mammaliaform transition