patches/Restricted: properly support StringIO

Our patch was wrong, it caused guarded_getattr to always allow
attributes of not protected instances of old-style classes. While this
look like a severe security hole, I don't we are using any sensitive non
protected instances

Because cStringIO.StringIO("initial value") makes a read-only StringIO
using another type, this was not supported.
4 jobs for feat/restricted_collections in 0 seconds
Status Job ID Name Coverage
  External
passed ERP5.UnitTest-TestRunner2

06:00:38

failed ERP5.UnitTest-TestRunner2

07:59:01

failed ERP5.UnitTest-TestRunner2

14:32:53

passed ERP5.UnitTest-TestRunner2

05:48:58