Moved over to hibernate for JPA due to potential leaks with eclipselink.

Also changed the delete all db entries method to do it the JPA way to avoid foreign key db errors.