Made virtual_only consistent in contribute_to_class.

See #21940

Conflicts:
	django/contrib/contenttypes/fields.py
	django/db/models/fields/__init__.py
	django/db/models/fields/files.py