Hibernate3 module fully splited

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