Removed usage of RelatedObject

The django.db.models.related module is now deprecated. The functionality
was moved to ForeignObjectRel which is accessible from field.rel.
RelatedObject was accessible from field.related.