[InputGraph] Expand InputGraph nodes.

Flavors may like to expand InputGraph nodes, when a filenode after parsing
results in more elements. One such example is while parsing GNU linker scripts.
The linker scripts after parsing would result in a lot of filenodes and probably
controlnodes too.

Adds unittests to verify functionality.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@195515 91177308-0d34-0410-b5e6-96231b3b80d8
[InputGraph] Add capability to process Hidden nodes.

Hidden nodes could be a result of expansion, where a flavor might decide to keep
the node that we want to expand but discard it from being processed by the
resolver.

Verifies with unittests.

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