Terminate the backend ourselves on PG 9.2+

This should make it harder to accidentally break this test.
Merge pull request #14036 from matthewd/pg_terminate_backend_4-0-stable

4-0-stable: Terminate the backend ourselves on PG 9.2+