SAN FRANCISCO (Reuters) - Apple Inc said on Monday its head of iPhone software and its head of retail would leave, the biggest shake-up in the technology company's executive ranks since Tim Cook became chief executive last year.