Add support for PostgreSQL. This required a bunch of more changes to
evict the last hardcoded MySQL details, but the database abstraction
layer seems to be working nicely now for at least MySQL and PostgreSQL
(further testing is encouraged). At least MS SQL and SQL Server seemed
broken from the outset and more work would be required to play ball with
them.

Main changes:

 * added the PostgreSQL db implementation

 * centralized (un)serializing, made things a bit DRYer

 * Use explicit aliases in getRunComparativeData() to not rely on
   implicit MySQL aggregate column naming. Makes the keys prettier too.

 * Added notes about remaining portability issues for other databases
   than MySQL and PostgreSQL.