A growing number of states are working to keep food out of landfills over concerns the waste is taking up too much space and posing environmental problems