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
Early return.

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

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@205568 91177308-0d34-0410-b5e6-96231b3b80d8
Simplify two if's.

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

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