[feature/auth-refactor] Convert provider_ldap to a service

Removes globals from provider_ldap and converts it into a service.

PHPBB3-9734