Fixed #21414 -- Removed usage of RelatedObject and deprecated it.

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.