Apple's Ternus inherits $5 trillion company as Cook exits CEO role