McDonald’s will buy back all of its Israeli sites after sales slumped following a boycott of the brand.