Merging code paths in LdapAuth.php and LdapFunctions.php and reusing core Piwik code when possible. Moved two functions in Ldap\Client.php (superficial change).