Support for EXPLAIN with remote DML planning

When running an explain query with DML that need Coordinator to
be generated, additional remote query plans in ModifyTable are
printed. Those plans are created by create_remoteinsert_plan,
create_remoteupdate_plan and create_remotedelete_plan in createplan.c

This commit also includes a fix for remote DML plans related to the scan
relation ID used. The relation ID was used but the correct way is to
use its Index when referring to the table list in Scan plan.
This commit improves major feature of GTM/GTM-Proxy, including

1) Correction of transaction bacukp to GTM-Standby.  Now it backs up
transaction handle and GXID, not proxy message from client.

2) Backup is written before response is	flushed	to the client.

3) Backup is optimizes so that no response will be written back
   from the standby if not needed.

4) Backup can be done synchronously or asynchronously. 	 In synchronous
   backup, each	message	flush to the client will be associated with
   synchronization of the message to the standby.

Also, one bug fix is included to make tcp_keepalives work to monitor
the client connection. 	 Server	connection monitoring will be included
in later patches.
Change file headers to 2012
Correct reference to pgxc_node_id in docs
When the whole row of a table is expected as a single column, while fetching the
results from a datanode using a SQL query, we should use tablename instead of *.
Otherwise, the results is sent as a set of columns rather than a record.

In create_remotequery_plan(), instead of hand-crafting the SQL query to be
shipped to the datanode, create a Query structure and deparse it.
Improve target list selection for remote DML queries

This commit makes remote DML planning generally available
for replicated and hash tables. There are still issues
related to node selection for round robin tables though.
The target list of UPDATE and DELETE using coordinator quals
was set to fetch only CTID when generating SELECT in their
inner plan generated by create_remotequery_plan.

Their target list is rewritten to include the columns in quals
so as to be able to evaluate those quals correctly on Coordinator.
In addition remote planning for UPDATE has been improved to be
able to target correct node when launching query.

A new regression test called xc_remote is added, it uses the
parameter enable_fast_query_shipping to force all the queries
to go through standard planner. Tests are done on replicated,
hash and round robin tables.
First fix out of the work of fixing the functional behaviour of some system
administration functions. The basic goal behind these changes is to make them
return correct results by making them cluster-aware.  This first part includes
object size functions.

The object size functions pg_database_size, pg_indexes_size, pg_relation_size,
pg_table_size, and pg_total_relation_size now return the cumulative size from
all the data nodes. For e.g., pg_relation_size returns the sum of disk space used
up by the specified fork at all the data nodes where the table is distributed
or replicated. If the table is replicated on 3 tables, the size will be 3 times
that of individual nodes. If you need to retrieve the local results from a
particular coordinator or data node, you should issue these function calls
explicitly through EXECUTE DIRECT statement.

Doc changes also included.
Rows with NULL value for distribution columns get inserted on all the datanodes.
Fixed the bug by handling the same in GetRelationNodes().
Correct node selection for preferred node

Even if a preferred node was defined, the node selection was enforced
on the first node of relation locator info.
Add all selected columns in ORDER BY clause to get the output always in same
order in tests txid and insert. Remove the alternate output for those tests and
modify expected output accordingly.
Support for TABLESPACE

TABLESPACE are re-enabled without having any modifications in its grammar.
A user defining a location for tablespace needs to be sure that this
location exists on all the nodes of the cluster.
A suffix with node name is added on the PG_XXX folder created in tablespace
to support tablespace in case several nodes are running on the same node.
New tablespace folder format is PG_XXX_NodeName. As node name is unique
and constant in the cluster, this insures that no conflict will appear
at the creation level.

For the time begin, DBA has no way to refine location of tablespace for a
single node level but this will be added later with extra support of CREATE/DROP
TABLESPACE through EXECUTE DIRECT.
EXECUTE DIRECT: grammar simplification and filter for utility commands

For the time being only CREATE/DROP TABLESPACE are allowed through
EXECUTE DIRECT on remote nodes only. Trying to launch EXECUTE DIRECT
on local node with a utility command is still blocked.

Grammar does not have anymore COORDINATOR/NODE as keyword, now only
the node name is necessary.
Stamp HEAD as 1.0devel.
Make psql commands consistent with Postgres-XC server version
Move bug report template to doc-xc
Extended Node DDL grammar for preferred and primary nodes

An optional boolean option can be specified with PREFERRED/PRIMARY
in CREATE/ALTER NODE to allow deeper customization of the node
behavior on Coordinator in the cluster.

Some code duplication has been removed in nodemgr.c and all
the error handling is now managed by check_node_options.
The RTEs corresponding to the RemoteQuery nodes created during planning by
reducing plan nodes like JOIN/GROUP/AGG are labelled as RTE_REMOTE_DUMMY. The
RTE created by JOIN reduction is provided with aliases generated as the column
names.
Regression test for node DDL

This checks grammar and error messages when using node DDL.
This test cannot be run in parallel as it changes the cluster configuration.
Make utility statements executed through functions work. The original utility
statement is sent to the other coordinators and datanodes only once by creating
a RemoteQuery node corresponding to that statement.
Make the advisory locks cluster-aware, so that a user connected from
coordinator 1 will wait for an advisory lock held by a user connected
from coordinator 2.

This support is enabled only for session level advisory locks in this commit,
Transaction level advisory locks are not included.