THRIFT-5700: Migrate to JakartaEE and Apache HttpComponents 5 (#2746)

- Migrate to JakartaEE and Apache HttpComponents 5
- Modify C code to choose which namespace choose for "Generated" annotations (jakarta by default)
diff --git a/lib/java/gradle/environment.gradle b/lib/java/gradle/environment.gradle
index 8c14a52..977c07e 100644
--- a/lib/java/gradle/environment.gradle
+++ b/lib/java/gradle/environment.gradle
@@ -61,8 +61,8 @@
 
 dependencies {
     implementation "org.slf4j:slf4j-api:${slf4jVersion}"
-    implementation "org.apache.httpcomponents:httpclient:${httpclientVersion}"
-    implementation "org.apache.httpcomponents:httpcore:${httpcoreVersion}"
+    implementation "org.apache.httpcomponents.client5:httpclient5:${httpclientVersion}"
+    implementation "org.apache.httpcomponents.core5:httpcore5:${httpcoreVersion}"
     implementation "jakarta.servlet:jakarta.servlet-api:${servletVersion}"
     implementation "jakarta.annotation:jakarta.annotation-api:${javaxAnnotationVersion}"
     implementation "org.apache.commons:commons-lang3:${commonsLang3Version}"