Al Sandrock, the head of R&D and longtime chief medical officer at Biogen Inc., is set to retire at the end of this year.