DERBY-6565 ROW_NUMBER function throws NullPointerException in UPDATE statement

Backported cleanly from trunk as:

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

Patch derby-6565-forbid.diff which makes it illegal to use window
functions in the update source. Adds a new test for this error
condition. Also cleans up some Javadocs and modernizes some loops.



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