18076: Fixes the bug, expands the test with additional checks.
If there's a stale cached user record that's creating the username collision,
set it to nil before retrying the update. There're two scenarios this is
covering:
1. The stale user record belongs to an existing user on LoginCluster. Its
username was taken by other user so the new username is coming in the
batch_update operation -- it's ok to temporarily have it set to nil.
2. The stale user record doesn't exist on LoginCluster anymore, so having
it being reset to nil isn't harmful and avoids future collisions.
Arvados-DCO-1.1-Signed-off-by: Lucas Di Pentima <lucas.dipentima@curii.com>