Fix up some oversights in psql's Unicode-escape support.
Fix up some oversights in psql's Unicode-escape support.

Original patch failed to include new exclusive states in a switch that
needed to include them; and also was guilty of very fuzzy thinking
about how to handle error cases.  Per bug #5729 from Alan Choi.

oberstet/postgres-xl,greenplum-db/gpdb,snaga/postgres-xl,yazun/postgres-xl,tpostgres-projects/tPostgres,lisakowen/gpdb,arcivanov/postgres-xl,50wu/gpdb,greenplum-db/gpdb,adam8157/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,50wu/gpdb,arcivanov/postgres-xl,tpostgres-projects/tPostgres,jmcatamney/gpdb,snaga/postgres-xl,lisakowen/gpdb,ovr/postgres-xl,50wu/gpdb,zeroae/postgres-xl,tpostgres-projects/tPostgres,Postgres-XL/Postgres-XL,jmcatamney/gpdb,postmind-net/postgres-xl,ovr/postgres-xl,zeroae/postgres-xl,zeroae/postgres-xl,postmind-net/postgres-xl,lisakowen/gpdb,Postgres-XL/Postgres-XL,arcivanov/postgres-xl,yazun/postgres-xl,arcivanov/postgres-xl,jmcatamney/gpdb,kmjungersen/PostgresXL,greenplum-db/gpdb,greenplum-db/gpdb,ovr/postgres-xl,lisakowen/gpdb,kmjungersen/PostgresXL,kmjungersen/PostgresXL,lisakowen/gpdb,postmind-net/postgres-xl,50wu/gpdb,ashwinstar/gpdb,tpostgres-projects/tPostgres,adam8157/gpdb,pavanvd/postgres-xl,50wu/gpdb,oberstet/postgres-xl,adam8157/gpdb,xinzweb/gpdb,techdragon/Postgres-XL,Postgres-XL/Postgres-XL,xinzweb/gpdb,pavanvd/postgres-xl,ashwinstar/gpdb,snaga/postgres-xl,postmind-net/postgres-xl,kmjungersen/PostgresXL,pavanvd/postgres-xl,adam8157/gpdb,jmcatamney/gpdb,greenplum-db/gpdb,xinzweb/gpdb,yazun/postgres-xl,ashwinstar/gpdb,techdragon/Postgres-XL,xinzweb/gpdb,pavanvd/postgres-xl,kmjungersen/PostgresXL,lisakowen/gpdb,adam8157/gpdb,lisakowen/gpdb,ashwinstar/gpdb,50wu/gpdb,ashwinstar/gpdb,greenplum-db/gpdb,jmcatamney/gpdb,oberstet/postgres-xl,adam8157/gpdb,oberstet/postgres-xl,xinzweb/gpdb,postmind-net/postgres-xl,arcivanov/postgres-xl,ovr/postgres-xl,techdragon/Postgres-XL,arcivanov/postgres-xl,lisakowen/gpdb,zeroae/postgres-xl,ashwinstar/gpdb,snaga/postgres-xl,xinzweb/gpdb,techdragon/Postgres-XL,zeroae/postgres-xl,oberstet/postgres-xl,adam8157/gpdb,yazun/postgres-xl,jmcatamney/gpdb,tpostgres-projects/tPostgres,Postgres-XL/Postgres-XL,ashwinstar/gpdb,xinzweb/gpdb,xinzweb/gpdb,50wu/gpdb,yazun/postgres-xl,pavanvd/postgres-xl,50wu/gpdb,greenplum-db/gpdb,ashwinstar/gpdb,ovr/postgres-xl,jmcatamney/gpdb,adam8157/gpdb,techdragon/Postgres-XL,snaga/postgres-xl,Postgres-XL/Postgres-XL