Bone-eating worms that can devour an entire whale carcass were also feasting on prehistoric reptiles more than 100 million years ago.