Support for pattern based attribute queries when using LDAP search based authentication

This adds support for finding the authenticating user based on ldap search filters where the values can be patterns in which the username is injected.

For example an LDAP authsource with
'search.attributes' => array('mail', array('mail', '%username%@example.org')),
lets users at example.org login using their full email address as well as just the local part.