Add some useful logging.
Moved implementation of start() to cpp file.
Set PRAGMA synchronous to NORMAL
Close database after retrieval of file record count.

As the csync updater opens the database itself, it is cleaner to close
the db before and open it again after csync has finished.
Added a close method to the journal class.
Use transactions to speed up database access.
Database initialize code cleanup.

If the QSqlQuery class is called with a query in the constructor, the query
is executed immediately. In fact, we executed each query twice before.
Later on we might want to implement a wrapper clas around the query.