Update Java dependencies

Update most dependencies to their latest versions, replace findbugs with
spotbugs as the former is dead and was replaced with the latter.

Fixes THRIFT-4937.

Client: java
diff --git a/lib/java/gradle/codeQualityChecks.gradle b/lib/java/gradle/codeQualityChecks.gradle
index 1ff1c29..b066287 100644
--- a/lib/java/gradle/codeQualityChecks.gradle
+++ b/lib/java/gradle/codeQualityChecks.gradle
@@ -3,18 +3,23 @@
 // Configure the Gradle code quality plugins here.
 //
 
-apply plugin: 'findbugs'
+dependencies {
+    spotbugs configurations.spotbugsPlugins.dependencies
+    spotbugsPlugins 'com.h3xstream.findsecbugs:findsecbugs-plugin:1.8.0'
+}
 
-findbugs {
+apply plugin: 'com.github.spotbugs'
+
+spotbugs{
     ignoreFailures = true
-    toolVersion = '3.0.1'
+    toolVersion = '3.1.12'
     sourceSets = [ sourceSets.main ]
     effort = 'max'
     reportLevel = 'low'
     excludeFilter = file('code_quality_tools/findbugs-filter.xml')
 }
 
-tasks.withType(FindBugs) {
+tasks.withType(SpotBugsTask) {
     reports {
         text.enabled = false
         html.enabled = true