[LinkingContext] Limit shared library undefined atoms to be added.

This adds functionality to limit shared library undefined atoms to be added
only once by the Resolver.

Dynamic libraries may be processed more than once if they exist within a
Group.

Also adds a test to verify the change.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@195307 91177308-0d34-0410-b5e6-96231b3b80d8
[test] Add InputGraph tests

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@195388 91177308-0d34-0410-b5e6-96231b3b80d8
Fix indentation and whitespace.

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