relocate() does not work without a lock

The Java algorithm accesses the first bucket without a lock (which I
believe is an error), and only then locks the retrieved item. We can't
do that in C++ since the first bucket may be deleted by another thread
before we manage to access it since we don't actually hold a lock.