Big brands make most store-brand groceries in the same factories. Here's where to save — and which to skip.