At 50, John Ternus has spent half his life working at Apple. In September, he’ll take over as chief executive.