Fixed #23623 -- Reduced memory consumption when generating ModelChoiceField choices

See https://code.djangoproject.com/ticket/23623#ticket