Here comes the new patch for MERGE command. It has the following features:
1. It is based on Heikki's merge_v102-cleanedup.patch. So, it is (hopefully) clean -- no meaningless white spaces and no overlong clause.
2. The "replaced" mark in MERGE query and plan structures are removed. In rewriter, the actions replaced by INSTEAD rules will be changed into DO NOTHING actions.