Allow to run pgpool_setup and regression test on Ubuntu box.

Since Ubuntu's bash is in /usr/bin, and others have bash in /bin/, we
need to use env command to make the scripts more portable.
Fix -i option (install directory of pgpool) not working.
Add --enable-cassert option to the configure and make necessary changes to compile the code with debug assertions.
If pgpool-II is compiled with cassert enabled, the assertion checking can be enabled or disabled
by command line option (--debug-assertions or -x)
Add missing include file sys/wait.h.

Per bug #104.
Add missing include file.

open(2) requires <sys/stat.h> according to the man page. Despite this
, it was ok on Linux, but FreeBSD requires it.
Fix non null terminated string problem by using StrNCpy instead of strncpy.

Covery says:
>>>     Calling strncpy with a source string whose length (64 chars) is greater than or equal to the size argument (64) will fail to null-terminate "(status + i).desc".

strncpy copies exact 64 bytes source string up to 64 bytes specified
by the third argument. In this case the destination string is not null
terminated. To fix the problem replace all the occurrence of strncpy to StrNCpy.
Fix an infinite loop of error at new active pgpool when virtual IP switching

When active pgpool stops and standby pgpool becomes new active, this brings
virtual IP up and confirm this by ping command. In previous, pgpool handle
exit code of ping wrongly and goes into an infinite loop.

In addition, the old active pgpool also hangs since this waits response
from the new active pgpool, which is in the infinite loop and not able
to respond.

This problem is reported by Qian Peng in [pgpool-hackers: 520].
do_accept() function was replaced with wait_for_new_connections()
by exception manager checkin and is no longer needed but it still
resides in the code.
This checkin removes the dead code of obsolete function.
Fix hangup when number of DB clusters > 2.

The cause of hang was "max_wal_senders" was set to constant 2. This
should be equal to number of DB clusters.
Fix follow master command to skip already-dead node.

For example, if primary node crashed and one of standby nodes is
promoted, follow master command should not automatically recover the
old primary node because it might be physically broken. For this
purpose, pg_ctl status is called to check the DB node is dead or
alive.
Disbale statement_timeout while executing online recovery.

Online may take very long time and user may enable statement
timeout. To prevent online recovery canceled by statement timeout,
disable statement timeout in the connection used by online recovery.

See [pgpool-general: 2919] for whole story.
Fix pool_table_name_to_oid in case new to_regclass used which is introduced in PostgreSQL 9.4.

The relcache func used here should return 0 if target table is not
found. However to_regclass returns NULL in this case. To fix the
problem now COALESCE is used.
commit imports PostgreSQL 9.4 raw parser.
Fix regression test 057 hung if run against PostgreSQL 9.4 or later.

PostgreSQL 9.4 or later changed libpq behavior: NULL username for
connection string does not cause an error (which is expected in the
test). As a result psql prompts and waits for user's input which
causes regression test hang if executed against PostgreSQL 9.4 or
later. To fix this, "\q" is implicitly provided to psql session.

Now the test (pgpool segafult) is only performed against pre 9.4. 9.4
or later happily passes the test.

Regarding libpq change see:
http://www.postgresql.org/message-id/20140708.111307.408695214582895632.t-ishii@sraoss.co.jp
for more details.
fix coverity issue:1223007 Use after free.
get_insert_command_table_name() function was using the
freed pointer in pool_debug() function call.
fix coverity issue:1223006 Use after free.

verify_backend_node_status() function was returning POOL_CONNECTION_POOL_SLOT pointer
after discarding(freeing) the connection object, which was only used by the caller function
to check the status of connection.
The current commit changes the return type of verify_backend_node_status() to boolen
for indicating connection sucess or failure.
Add new directive "connect_timeout".

This is for timeout value in milliseconds before giving up to connect
to backend using connect() system call in
connect_inet_domain_socket_by_port() which is used for health check
and creating backend connection.  Since we use non-blocking connect(),
we use select() if connect() returns "in progress" state. Before the
timeout value for select() was fixed 1 second, which is not long
enough for flaky network such as AWS.  So new knob is added to control
the timeout value.
Fix SELECT statement used in pool_table_name_to_oid() for to_regclass.

By previous commit it always retruns 0.
Fix pool_handle_query_cache() to not pfree NULL pointer.
Fix to close pipe when ping command exits with failure

This bug causes pipe open error: Too many open files, which
leads to failure of connecting to trusted servers, and then
pgpool goes to down status.