The country’s biggest retailer is tightening its belt to match changing consumer spending habits and a slowing economy.