Fix the way `detect_common_display_methods` finds label & value methods

It was previously looking at an instance of the `collection` instead of the
`collection_classes`. Since the grouped collection input supplies a list
of collection classes that differ from the regular collection, it was
incorrectly looking for labelling and value methods on the option
instances, rather than the optgroup instances.
Merge pull request #771 from zephyr-dev/fix-label-detection-for-grouped-collection-inputs

Fix the way `detect_common_display_methods` finds label & value methods
Change only the implementation to grouped select
Use the first non-empty object to detect the label and value method for
grouped select

Fixes #978
Merge pull request #1016 from plataformatec/rm-fix-grouped-select

Fix grouped collection value/label method automatic detection