[libcxx] Preserve order, avoid duplicates when merging static archives
glob can return files in arbitrary order which breaks deterministic
builds. Rather, use ar t to list the files in each archive and
preserve the original order. Using ar q results in duplicate entries
in the archive, instead use ar r to avoid duplicates.
Differential Revision: https://reviews.llvm.org/D58024