Override KeyedService::Shutdown() to clean up raw_ptr members and invalidate weak pointers before the service is destroyed. Without this, the defaulted destructor detects dangling raw_ptr references to PrefService and PolicyService objects that are already freed during the profile teardown sequence. Resolves https://github.com/brave/brave-browser/issues/52757