Fix user attribute fallback

For some of the omniauth user attributes that omniauth-ldap fetches from the LDAP server we have a list of fallback options in case an attribute is missing, for example:

```
'email' => ['mail', "email", 'userPrincipalName']
```

This means that if the LDAP object for the user does not have a `mail` attribute, omniauth-ldap will try the `email` attribute, and then the `userPrincipalName` attribute.

This attribute fallback was broken. In this PR we cherry-pick the upstream commits that fix this functionality, and we modified the tests to catch future regressions.