#80 Introduce shippability for constraint management

Michael Paquier

In Postgres-XC, constraints can be created only if they can be locally enforced, meaning that a constraint can only be checked on remote nodes.
At constraint creation, the constraint is checked depending on the distribution data of its parent table.
If both things are not compatible, the constraint creation is blocked and process returns an error.

This needs to be improved by using what is called the shippability of constraints, which is simply a switch to decide if the constraint needs to be evaluated locally or remotely.
Some constraints are using triggers to fire some events on them, and the shippability of triggers can also be evaluated depending on the shippability of the function they fire. So in this case pg_constraint needs to be extended with a shippability flag.