Tim Cook’s resignation as Apple CEO will end one of the most successful management runs in the history of US business.