Ensure that updated command ID is sent to the datanode once its updated in the
active snapshot on the coordinator/datanode

We have an optimization to discourage sending command ID unless its needed.
That works by tracking top level statements, but that not work when multiple
statements are executed as part of a single query. This can happen in
multi-portals or with plpgsql functions. So now we signal the coordinator (or
datanode in case of datanode-datanode communication) to send down updated
command ID when its updated in the active snapshot. More testing required to
ensure that there are no other paths which may require similar treatment.

Bug report and test case from Aaron Jackson. Fix by me.
Set the size of pending connections on a pooler socket to some respectable high
limit

The current count of 5 was showing up in errors while running pgbench tests
with more than 10 clients. This probably may not be a problem on all platforms
since some platforms have built-in ability to retry from the client side. But
it was definitely showing up on OSX
Refactor the XID assignment code.

The current code had become quite messy and error-prone. So that has been
refactored. We now make some simple assumptions to allow a gloabl XID to be
fetched from the GTM directly or use of local XIDs. Tha latter is restricted
only for initdb while former is useful for autovacuum launcher/worker, backend
initializing and certain commands such as VACUUM/CLUSTER which can't be run
inside a transaction block
Send down comamnd ID even before an utility statement is sent

We have seen corner cases where an utility statement on a datanode will
increment local command ID counter (say, because of cascade drop), but the same
is conveyed back to the remote coordinator. Later when coordinator sends down a
lower numbered command ID, catalog access fails to see an object created in the
same transaction.

This fixes the case reported by Aaron Jackson. But we would do further
refactoring on the command ID management to ensure all corner cases are handled
properly.