BUG-893: fix loaderClassPaths safety

This fixes thread safety of loaderClassPaths, as there was a
TOCTOU error. Furthermore this actually populates the map, such that we
do not continue to add classloaders.

Drive-bys include final keywords and cleanup on utility classes.

Change-Id: I3c96a4e98b242d34d7036bcb81f71f36ff88223c
Signed-off-by: Robert Varga <rovarga@cisco.com>
(cherry picked from commit 19cb9eed5cf91ca65c5bb558ce5f30c16fcb330a)
Signed-off-by: Robert Varga <rovarga@cisco.com>
Merge "BUG-893: fix loaderClassPaths safety" into stable/hydrogen