Changed type of database fields from 'long' to 'int'

They are stored in the database the same way, sizeof() are equal
but new gcc compiler couldn't find the right SqliteStatement::Bind()