[SqlDatabase] New class allowing to exec Sql queries in separate thread

It uses its own QSqlDatabase connection, which is supported according to
docs.
[DatabaseWriter] Replace with new SqlDatabase class