DERBY-6689 Assert failure/NPE when using ROW_NUMBER in MERGE ... INSERT

Backported cleanly from trunk as:

svn merge -c 1616334 https://svn.apache.org/repos/asf/db/derby/code/trunk

Patch derby-6689. Adds checking for presence of window functions in
the matching clause nodes and throws 42ZC2 is that's the case. Adds a
test case.



git-svn-id: https://svn.apache.org/repos/asf/db/derby/code/branches/10.11@1616513 13f79535-47bb-0310-9956-ffa450edef68