URBNG-35: Changes in tables

This pull-request includes fixes of my previous one. There are some changes i database structure and counting points.
Also added some unit tests.

Still rank and notifications are not implemented.