(PDB-707) Fix bonecp 57P01 handling

This patch adds retry handling for 57P01 failures, which result in an
PSQLException with a status code of 08003. The patch has been made
forward compatible by catching all SQLExceptions with this status code.

Version 0.8.0-RELEASE of Bonecp does not throw the correct sql state code
today, however a patch has been raised to make this happen so we can
upgrade to this version in the future.

Signed-off-by: Ken Barber <ken@bob.sh>
Merge pull request #1073 from kbarber/ticket/stable/pdb-707-bonecp-last-conn-after-pg-restart

(PDB-707) Fix bonecp 57P01 handling