Add a test case for error handling.

The current behavior isn't actually quite correct with some configurations,
but seems better to add the regression test now anyway, even though the
errors_2.out basically memorizes the bogus behavior. It should be removed
when the bug is fixed.
Cleanup
Merge branch 'master' into libpq-integration4