Reset current thread classLoader to avoid Kafka to use it

When the current thread classloader is set, Apache Kafka tries to
use it to resolve its classes. For plugins the thread class loader
is not the one that read from the jar and thus connections to Kafka
fail because of ClassNotFoundException

Change-Id: I4f14cf43d1465841c5eb7db2c35acd9beed8d19f
diff --git a/src/main/java/com/googlesource/gerrit/plugins/kafka/session/type/KafkaSession.java b/src/main/java/com/googlesource/gerrit/plugins/kafka/session/type/KafkaSession.java
index 6cd9ad7..b5a16df 100644
--- a/src/main/java/com/googlesource/gerrit/plugins/kafka/session/type/KafkaSession.java
+++ b/src/main/java/com/googlesource/gerrit/plugins/kafka/session/type/KafkaSession.java
@@ -51,10 +51,16 @@
 
     LOGGER.info("Connect to {}...",
         properties.getProperty("bootstrap.servers"));
+    setConnectionClassLoader();
     producer = new KafkaProducer<>(properties);
     LOGGER.info("Connection established.");
   }
 
+  private void setConnectionClassLoader() {
+    Thread.currentThread().setContextClassLoader(
+        KafkaSession.class.getClassLoader());
+  }
+
   @Override
   public void disconnect() {
     LOGGER.info("Disconnecting...");