Fixed #18355 -- Add ordering options to generic views.

Added new attribute and overrideable method to MultipleObjectMixin
to allow easy sorting of the queryset.

Refs #21450.