Another pull request nag -- PostgreSQL auto-reconnection, take 2

Hi all,

I have a new pull request pending:

This is a new stab at making PostgreSQL auto-reconnection work properly. Adds test coverage to the code that is already supposed to be making the automatic reconnection work, and fixes a problem that was demonstrated by the tests.

– Steve J.