With nearly 40% of food in the U.S. thrown away, new apps are helping consumers match expiring foods destined for the landfill with shoppers looking to save cash.