unpickling now uses an external function

pickle uses a special function to call the class which tells it to either apply
or skip __setstate__