Custom class loading strategy for cglib and javassist proxies

Fixes https://hibernate.onjira.com/browse/HHH-5962 Issue.
The issue was that Hibernate's classloader uses the classloader of mapped classes to load its own classes (i.e. org.hibernate.* etc) after creating the proxy. It works well if the classloader of the enhanced classes is the same as the Hibernate's one but it fails if this classloader knows nothing about the hibernate classes (e.g. if the mapped classes are dynamically loaded from another bundle).

I've been testing the patched Hibernate with my OSGi project for a few months and it works pretty well.