Pull request: Small fixes and tests related to hibernate + upgraded the hibernate version

Please note that I've upgraded the hibernate version to 4.3.1.Final . This fixes the problems that we've talked about ("AssertionFailure null identifier") plus a few others. 
The rest are some tests that I created and which were failing because of the hibernate issue and which are passing now ( The other junit tests are passing as well and i also tested the import process and didn't get any error). 
There are also some small adjustments to FK names.