BUG-983: prepare for proper wrapping

This patch introduces a factory method to get instances, such that there
only ever is a single instance for a particular class pool. This fixes
the potential issue of adding a class path multiple times.

Change-Id: Ia8ff47674b768bd85ae50200734b8f14927f8a5c
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 72cef26f23ec5f42a0750cc56681acdc88a73167)
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "BUG-983: prepare for proper wrapping" into stable/hydrogen