#3 Implemented JPA for new database scheme.

Reworked old JPA classes for database into better ones. Implemented
AUTO_INCREMENT, NOT NULL for every column in tables and also improved
names of tables. At the end of implementation reworked relations between
tables. I hope everything will be all right.