Database, authentication and logic fixes

* Fixed few style problems
* Made Commentary and Post extend one abstract class (to remove duplicate code)
* Fixed database problems
* Added database initialization script
* Fixed integration tests problems
* Reorganized project structure

Also temporarily set DB for jetty to IMDB (testing DB) for convenience.