DERBY-6419 Make BTree scan honor OPENMODE_LOCK_NOWAIT for row locks

A follow-up patch: derby-6419-followup.

Only short circuit waiting for lock in BTree scan to check duplicates
for a deferred unique/pk constraint if constraint mode is deferred
(i.e. not if immediate).

Added a test case lifted from UniqueConstraintMultiThreadedTest, which
exposed the issue when we run the regressions with default deferrable
by default (see DERBY-532).



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