PostgreSQL, Fix change detection caused by superfluous bytea unescaping
and fix compatibility with pg-0.18.0.

This showed up when running BinaryTest#test_load_save with the more
restrictive input string handling of pg-0.18.0.pre20141117110243.gem .

This also adjusts a test to check for this bug, independent of the pg version.