Change PostgreSQL driver library and fix bug in db.PostgresqlDb class.

Change PostgreSQL driver library to pg8000.
Fix problem with premature transaction commits, which caused named portals to be removed; portals are removed once a transaction has ended.