Close listen socket when smart shutdown request is made.

When smart shutdown process starts, pgpool children still listen on
the port and clients can send further connection requests which fail
in the end. Which is not only waste of time, but also prevents a load
balancer which sits in front of pgpool from realizing the pgpool is
going down.

Problem analyzed and patch provided by Junegunn Choi in pgpool-hackers
474, and enhanced to take care not only inet domain socket but UNIX
domain socket by me.
Fix typo
Add cautions that recovery commands are killed by statement_timeout of PostgreSQL.

recovery_1st_stage_command can be killed if its execution time is
longer than statement_timeout and online recovery fails. The problem
was found and reported by Sean Hogan at [pgpool-general:
2680]. Samething can be said to recovery_2nd_stage_command.
Fix wait_for_pgpool_startup does not work.

It does not execute psql because path to psql was taken from wrong
environment variable.  So the function always retires for 20 seconds
hopelessly and regression test takes longer time than it needs.
Fix test driver for watchdog to use wait_for_pgpool_startup correctly.

It does not source bashrc.ports and does not use correct pgpool port
number.