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

Removes globals from provider_apache and turns it into a service.

PHPBB3-9734