Fix ELFFileNode::resetNextIndex().

ELFLinkingContext has a method addUndefinedAtomsFromSharedLibrary().
The method is being used to skip a shared library within --start-group
and --end-group if it's not the first iteration of the group.

We have the same, incomplete mechanism to skip a shared library within
a group too. That's implemented in ELFFileNode. It's intended to not
return a shared library on the second or further iterations in the
first place. This mechanism is preferred over
addUndefinedAtomsFromSharedLibrary because the policy is implemented
in Input Graph -- that's what Input Graph is for.

This patch removes the dupluicate feature and fixes ELFFileNode.

Differential Revision: http://llvm-reviews.chandlerc.com/D3280

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205566 91177308-0d34-0410-b5e6-96231b3b80d8