Correct documentation related to SERIAL and DEFAULT values

Now both functionalities are fully supported.
Revert "Support for Fast Query Shipping (FQS)". This commit is causing a huge
performance drop. The commit will be deferred till we find out the root cause of
the performance drop.

This reverts commit 191d55ebf1faf897aed51f1b5fdcd71ec3ccdc6c.
Doc change required after some of the system functions were made cluster-aware,
namely: set_config, and advisory lock functions.

The doc changes for object size functions is already updated.
When debug_print_plan is ON, print RemoteQuery and ExecNodes nodes in the plan.
Add PGXC flags forgotten in last commit
Fix for this bug:
3495890: regress: plancache, table drop doesn't drop plan

In a FQS plan, save plan dependencies, so that dropping objects will
invalidate the cached plan if it depends on those objects. Use
set_plan_references() to obtain the dependent objects.
Add the support for Fast Query Shipping (FQS), a method to identify whether a
query can be sent to the datanode/s as it is for evaluation and do so if deemed
fit. In such cases, we create a plan with a single RemoteQuery node
corresponding to the query and avoid the planning phase on coordinator.

A query tree walker analyses all the nodes in the query tree and finds out the
conditions under which the query is shippable and detects presence of
expressions which can not be evaluated on the datanode. It looks at the
relations involved in the query and deducts whether JOINs between these
relations can be evaluated on a single datanode.

In create_remotequery_plan() if the table is distributed, the nodelist is
reduced by looking at the qualifying conditions on the table. Function
create_remotejoin_plan is modified to use the FQS logic to decide the
shippability of JOIN.

Adds testcases xc_FQS and xc_FQS_join to test the fast query shipping
functionality and make it independent of cluster configuration.
Fix for bug ID : 3459834 : plancache.sql: cache lookup failed for type 0
This issue was causing when RangeTblEntry->reltupdesc was printing attribute for
which the column is marked as dropped.
Removed reltupdesc field itself, because it is now found to be redundant.
Fix couple of bugs where is_temp flag was not getting propogated properly
during planning, especially if plan nodes are reduced as part of optimization.
This would leading to forcing a 2PC which the data nodes could not handle
because of temporary objects being accessed.

Also, comment out an assertion which is really a PostgreSQL bug, but getting
highlighed once we bar the explicit PREPARE TRANSACTION in XC
Refactor transaction managemente code:

We track the nodes involved in global transaction as and when we send
BEGIN commands to the node. The nodes are tracked as either read-only
participant or read-write participants. This is important to later
decide whether do perform a 2PC or a simple commit on the remote
nodes. We right now rely on the planner information to (and the patch
does not change that much) to know if a transaction is doing any write
activity or not. This can be problematic in the presence of volatile
functions that can change the database state.

The decision to whether run a statement in auto-commit mode on the
data node or within a transaction block is also hard. We can run a
statement in auto-commit mode if and only if one data node is involved
in the transaction AND the statement will be sent to the data node
only once. Before this work, there were places where we were not
encapsulating statements in a transaction block possibly leading to
wrong results. After fixing this, there is a chance that we might see
some performance impact.

There are many cleanups: Here is a list, but probably not complete:

1. We now have only one member (transactionId) to track local or
global transaction identifier. Since we should always be using global
identifier in XC, this reduces the risk of wrong IDs being assigned
2. I removed the additional transaction state - TBLOCK_END_NOT_GTM. It
wasn't clear why we need this
3. 2PC is now hooked into PrepareTransaction/CommitTransaction.
Similarly, rollbacks and part commits are handled in AbortTransaction
4. The GTM transaction termination is handled in
Commit/AbortTransaction. That gives is a single entry point for
transaction management
5. Instead of various flags, we now just track if the local node is
involved in the transaction or not. That helps us decide whether to
perform 2PC on the local and remote node. This can further be enhanced
by looking at some other existing globals that PostgreSQL maintains
6. I have ripped off many other functions which are either not needed
now or probably needed for explicit 2PC. I will take another look at
them when I add back support for explicit 2PC
Add support for explicit 2PC
Instead of maintaining a separate proc array for autovacuum processes,
we store them at the start of the common procArray. That helps us to
quickly add missing XIDs to local snapshot if needed.
Some bug fixes after the merge with current master. Also, handle the case
where a PREPARE fails on one node, but succeeds on the other node. We
should rollback such transactions properly.
Note the coordinator count correctly while executing remote utility query
Improve error handling. Also, turn 9.1 serializable isolation level into
pre 9.1 serializable (or 9.1 repeatable reads) isolation level
Ensure that the connection array is realloced after new nodes are added
to the cluster
Fix few warning messages
Remove an assertion that checks for calling AbortTransaction on an already
aborted transaction. We have seen this happening when a ROLLBACK statement
is canceled by the client. We believe this is a PostgreSQL issue, but gets
manifested by XC. We should discuss this further on the hackers list
In create_remotequery_plan() there is a path in which an uninitialised variable
distcol_expr can be used and thus can cause server crash in case its default
value is NON-NULL. Initialised it to NULL.
Fix code alignement issue with pg_dump

This issue was perhaps due to merge with postgres 9.1.

Patch by Andrei Andrei Martsinchyk