qttools_sql: add logging of SQL statements in DatabaseManager