Stocking up at Costco or Sam's Club can save thousands — or throw your money straight into the trash. Know the difference.