Backported fix from vitalidze/dev commit a8683ff;  Added additional code to User.java for added protection;
Updated the Hibernate plugins (mostly to support JPA 2.1); Added PostgreSQL driver to match traccar pom.xml.
Removed Hibernate-specific code and replace with JPA equivalents.
Made all id's use GenerationType.IDENTITY; Replaced wildcard imports with specifics.
Formally named unique and foreign keys.