db_postgres: add new module vars "timeout" and "tcp_keepalive"

The "timeout" option enables a query timeout as well as a connection
timeout, set to the specified number of seconds.

The "tcp_keepalive" option enables the kernel's TCP keepalive packets
on the PGSQL socket and sets the keepalive timer to the specified number
of seconds. Only supported if the platform supports the TCP_KEEPIDLE
socket option.