A patch to improve replicated table update/delete handling.

This commit performs updates/deletes to replicated tables
based on either primary key or unique index under the following
conditions

1. The replicated table has either a primary key or a unique index defined.
2. The query is not changing the primary key itself.

Otherwise ctid is used, like we were using previously.

The patch was submitted by Abbas Butt.