Back out partial '__getstate__' / '__setstate__' changes.

Reverts 7cc49dfeb4046dbddad6209fa2c1d18941b12f2a.