SAN FRANCISCO (Reuters) - Apple Inc Chief Executive Tim Cook on Monday replaced the heads of its software and retail units in the company's most sweeping executive shake-up in a decade following embarrassing problems with its new mapping program and unpopular store-related decisions.