[PECOFF] Sort export table properly.

Export table entries need to be sorted in ASCII-betical order,
so that the loader can find an entry for a function by binary search.

We sorted the entries by its mangled names. That can be different
from their exported names. As a result, LLD produces incorrect export
table, from which the loader complains that a function that actually
exists in a DLL cannot be found.

This patch fixes that issue.

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@222452 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] use reference with "auto" to prevent copies

Patch by Jean-Daniel Dupas

git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@222455 91177308-0d34-0410-b5e6-96231b3b80d8
[mach-o] fix whitespace

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