### Elasticsearch Version

8.4

### Installed Plugins

_No response_

### Java Version

_bundled_

### OS Version

Darwin kpl3x4j763.kalpatarugroup.com 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64

### Problem Description

# Description
When running `./gradlew` in my Mac M1 with Big Sur I get an error from `sysctl` mentioning that `hw.perflevel0.physicalcpu` is an unknown property. When listing all properties using `sysctl -A` there's no `hw.perflevel*.*` properties at all.

Looking into this forum https://githubhot.com/repo/seanmonstar/num_cpus/issues/104 it seems the property is not displayed on versions before Monterey. I went ahead and changed this https://github.com/elastic/elasticsearch/blob/master/build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/info/ParallelDetector.java#L67-L69 to always use the `"hw.physicalcpu"` property and was able to get a clean build.

I think we should either specify somewhere that MacOS Monterey is required for building Elasticsearch in M1 macs or change the code in `ParallelDetector.java` such that it uses `"hw.physicalcpu"` for versions older than Monterey. I personally prefer the second option and I'll be happy to take the PR for fixing it if you all agree.

### Steps to Reproduce

N/A

### Logs (if relevant)

_No response_
build-conventions/src/main/java/org/elasticsearch/gradle/internal/conventions/info/ParallelDetector.java
}
                } catch (IOException e) {
                    throw new UncheckedIOException(e);
                }
                _defaultParallel = socketToCore.values().stream().mapToInt(i -> i).sum();
            } else if (isMac(project.getProviders())) {
                
                ByteArrayOutputStream stdout = new ByteArrayOutputStream();
                
                String query = project.getProviders().systemProperty("os.arch").getOrElse("").equals("aarch64")
                    ? "hw.perflevel0.physicalcpu"
                    : "hw.physicalcpu";
                project.exec(spec -> {
                    spec.setExecutable("sysctl");
                    spec.args("-n", query);
                    spec.setStandardOutput(stdout);
                });
                _defaultParallel = Integer.parseInt(stdout.toString().trim());
            }
            if (_defaultParallel == null || _defaultParallel < 1) {
                _defaultParallel = Runtime.getRuntime().availableProcessors() / 2;
            }
        }
        return Math.min(_defaultParallel, project.getGradle().getStartParameter().getMaxWorkerCount());
    }
    private static boolean isMac(ProviderFactory providers) {
        return providers.systemProperty("os.name").getOrElse("").startsWith("Mac");
    }
}