The outgoing CEO Tim Cook, who'll stay on as executive chairman, built up an unprecedented record of success over his tenure