Applying the fix for NMS-6589 on the factory class used by the JMX detectors.

For some reason, the JMX detectors are not sharing the same factory
class used by the JmxMonitor, JmxPlugin and the JmxCollector.
Merge remote-tracking branch 'origin/1.12' into rc/stable/1.14.0