Fixing iteration over objects for abstract models

I found this when trying to run `./manage.py generateimages`.  One of my models is abstract and includes several `ImageSpecField` fields.

I'm pretty sure that the attached patch does not address all the potential issues involved with abstract base classes.  For example, the generator registry only includes one entry corresponding to the abstract base; it may make sense to instead list it for all the descendants that correspond to non-abstract models.