Let installcheck-world pass against a server requiring a password.

Give passwords to each user created in support of an ECPG connection
test case.  Use SET SESSION AUTHORIZATION, not a fresh connection, to
reduce privileges during a dblink test case.

To test against such a server, both the "make installcheck-world"
environment and the postmaster environment must provide the default
user's password; $PGPASSFILE is the principal way to do so.  (The
postmaster environment needs it for dblink and postgres_fdw tests.)
Fix contrib/pg_upgrade/test.sh for $PWD containing spaces.

Most of the necessary quoting was in place; this catches the exceptions.