Introduced ModelAdmin.get_fields() and refactored get_fieldsets() to use it.

Refs #18681.