Tim Cook’s replacement as chief executive, John Ternus, knows hardware engineering. Can he be a product visionary and a global diplomat?