An Automatic Sound and Complete Abstraction Method for Generalized Planning with Baggable Types