DERBY-6576 A immediate Fk constraint blows up iff its referenced PK is deferred and we modify a duplicate key column

Patch derby-6576-3. We need to keep better track of how many rows are
deleted/modified of each key when we are doing deferred code path
deletes since the actual deletes doesn't happen until after all the
checking.

The patch does this by using a disk based hash table. Then after going
through all the rows/keys to be deleted/updated and adding them to the
hash table (one entry per unique key, with a counter), we compare the
number of key duplicate instances present with the number of (planned)
deletes. Unless at least one row would remain in the referenced table,
we have a violation of the foreign key constraint.

This method is used for both deletes in deferred row processing mode
and for updates, which always has this mode in the presence of foreign
key).

For deletes in direct delete code path, we simply check that at least
one row would remain when we do the delete.

Added extra tests, including a test that uses a compound fk/pk to
check that the index mapping happens correctly when we save the keys
to the temporary hash table.

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