Improved and streamlined query-logging.

Redid the query-logging mechanism to be simpler, by removing the wrapper functions from fof-db.php, and extending the PDO and PDOStatement classes with classes/pdolog.php.

No longer tries to create database on every invocation, instead only tries when installing.