[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