remove the fd 'retry' loop

This is all crap. We're dealing with array indexes here, not absolute fd numbers.
more get_new_random_fd cleanup

Remove the goto targets, and split out the code that gets used in
multiple places.