A bundle of updates: more recent pg, fixing three failing tests, time zone fix, external db config...

pg is up to major version 2 - we should use the latest and greatest
found a double-connect bug when querying too quickly after startup; fixed.
didn't want to store my database connection info in the source file itself, added a config.json to the test directory
two core tests were failing because count() was returning a string; fixed.
UTC dates were being interpreted as the local time zone, now we force Postgres to look at the timezone info; this fixes the third test failure.