Enable unpickling base.Resource objects

If no __setstate__ method provided, an infinite recursion occurs during unpickling.

Change-Id: I2c9026e8af20b6e54133b8a2c44b82cfd599e9af
Merge "Enable unpickling base.Resource objects"