McDonald’s said it would restructure its business to focus more on franchises, and would recast its market segments and cut costs, as the fast food giant grapples with weak global sales.