Wrap files to translate error types

StringIO.fileno may raise either an AttributeError or an
UnsupportedOperation exception, however, some versions of PIL only
catch the former. To work around this, we wrap the object and
redispatch an AttributeError when UnsupportedOperation is raised.

Related:
- https://github.com/matthewwithanm/django-imagekit/issues/240
- https://github.com/matthewwithanm/django-imagekit/issues/243
Always wrap file for writing but return unwrapped file

This way, the user will always get back the expected file object.
Also, we avoid an unnecessary (possibly) extra save attempt.
Merge branch 'unsupportedoperation-fix' into develop

* unsupportedoperation-fix:
  Always wrap file for writing but return unwrapped file
  Wrap files to translate error types