Cook will become executive chairman Sept. 1 after 15 years; hardware chief John Ternus will take over as CEO.