Add tests for Sql.get_single_int
Add transactions, Db tests, refactoring

- Remove Sql.exec, use Db.execute or Sql.get_array instead
- Abstract single value parsing from SQL results queries
- Use ERROR level for PostgreSQL errors
- Fix random typos in Db delegation calls