Core db features in separate classes for Pgsql and Mysql

I rewrote the `include/db.php` to use separate classes for Pgsql or Mysql so that there's less `if (DB_TYPE == xxx...` branching. Also adding a new database type (e.g. SQLite3) is a bit easier. (There are still various if-branches all over the rest of the code. But this is a start.)

And I fixed a strict warning in `classes/sanitizedummy.php`.