Also update psqlscan.l with the UESCAPE error rule changes.

Even though this patch had no user-visible difference, better keep the code
in psqlscan.l sync with the backend lexer. And of course it's nice to shrink
the psql binary, too. Ecpg's version of the lexer doesn't have the error
rule, it doesn't try to avoid backing up, so it doesn't need to be modified.

As reminded by Tom Lane
Add regression test for MV join to view.

This would have caught a bug in the initial patch, and seems like
a good thing to test going forward.

Per bug report by Erik Rijkers and fix by Tom Lane
Merge branch 'master' into matview