Don’t want to waste your groceries because they’re past their best? Here’s how to make your fresh produce go the distance.