Fixes races condition in getSingleRelationship().

Added test that checks for duplicate entries in the iterator returned by getSingleRelationship. If the iterator contains multiple identical entries, then silently swallow any barf and return the first as the user expected.

Note: this commit is a bit of a band-aid since we really need proper isolation in the kernel. The test and the code likely should be removed in some future state.
Tidied up the unused parameters in NodeImpl.