Added support for PostgreSQL-based certificate database

* Abstracted common SQL code in new class SqlCertificateDatabase.
* Fixed SQL to not use SQLite-only syntax (explicit lower() calls instead
  of COLLATE NOCASE, "IS NOT NULL" instead of just "NOT NULL")
* Fixed certificate loading to not depend on case of column names (some
  backends implicitly convert uppercase to lowercase unless the
  identifiers are quoted and return column names with different case than
  the one used in CREATE TABLE).
* Added NpgsqlCertificateDatabase class and tests.
Merge pull request #52 from fogzot/master

Added support for PostgreSQL-based certificate database