[ELF] Order DT_NEEDED entries by command line order.

With this all test-suite tests pass with lld on x86-64 Linux.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@204291 91177308-0d34-0410-b5e6-96231b3b80d8
[gnu-ld] Support -m on non-NetBSD targets.

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