France is making it illegal for large supermarkets to throw away edible food as part of a series of measures to cut down on waste.