Javadoc
This clears any references this classloader might have that will prevent garbage collection.
Borrowed from Tomcat's WebappClassLoader#clearReferences() (not javadoc linked intentionally)
The only difference between this and Tomcat's implementation is that this one only acts on
openmrs objects and also clears out static java.* packages. Tomcat acts on all objects and
does not clear our static java.* objects.