If lld is renamed (or symlinked) to "ld" automatically pick the right flavor.

The existing system linkers on Darwin and Linux are called "ld".  We'd like to
eventually drop in lld as "ld" and have it just work.  But lld is a universal
linker that requires the first option to be -flavor to know which command line
mode to emulate (gnu or darwin).

This change tests if argv[0] is "ld" and if so, if the tool was built on MacOSX
then assume the darwin flavor otherwise the gnu flavor.  There are two test
cases which copy lld to "ld" and then run it. One for darwin and one for linux.

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