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