Fix select2('') calls on multiple elements
Fix select2('') calls on multiple elements

This fixes an issue when any of Select2's special options are called on
multiple elements, it would only affect the first option in the group.
This was because Select2 was only applying any changes to the first
element in the group (as chosen by jQuery) instead of applying changes
on each and every element within the list.

This has the new side effect of special options like `select2('data')`
returning the results for the last element in the list instead of the
first element. Because the previous functionality was considered
unspecified behaviour, this is not being treated as a breaking change.

This closes https://github.com/select2/select2/issues/3413
This closes https://github.com/select2/select2/pull/3495

tzellman/select2,tzellman/select2