Move Hibernate3 support in its own module

Repair core tests and completely remove hibernate dependency from itself
Move test to uncouple hibernate dependency from core
Support hibernate as optional runtime environment
Remove unnecessary casting
Split hibernate dependency from core legacy refactor
Split hibernate dependency from core