Use the E'..' syntax for escapes in tests

Versions before 9.1 defaulted to standard_conforming_strings=off,
which this test case did not fully take into account.
Send the same client_encoding we expect to get back

While 9.1 and later always replied with "UTF8", 9.0 at least seems
to send us back "UTF-8" if that's what we asked for.
Add Travis support for Postgres 9.0, 9.1, 9.2, and 9.3

Previously we just used the default available Postgres;
this ensures pq works correctly on all supported versions.