add gradle plugin to auto download JDKs needed fo build

* this makes it easier to build e.g. when no JDK16 is installed. It installs it automatically (see https://docs.gradle.org/current/userguide/toolchains.html#sub:download_repositories).
see also the discussion here https://github.com/apache/freemarker/pull/79#issuecomment-1868098656

Feel free to exclude this commit if this should be in a separate PR
diff --git a/settings.gradle.kts b/settings.gradle.kts
index eb1de9c..e74adfb 100644
--- a/settings.gradle.kts
+++ b/settings.gradle.kts
@@ -21,6 +21,10 @@
 
 apply(from = rootDir.toPath().resolve("gradle").resolve("repositories.gradle.kts"))
 
+plugins {
+    id("org.gradle.toolchains.foojay-resolver-convention") version "0.7.0"
+}
+
 dependencyResolutionManagement {
     versionCatalogs {
         create("libs") {