This follows up on the work in D116599, which changed AttrBuilder to store string attributes as SmallVector<Attribute>. This patch changes the implementation to store *all* attributes as a sorted vector.
Doing this both makes the implementation simpler, and gives a sizable compile-time improvement: https://llvm-compile-time-tracker.com/compare.php?from=e7bfe83773c000da13a8e2495b6230e846a322c4&to=3668e3d5a34dd713615dce96a5eb7de21b295772&stat=instructions
Depends on D117552.
could be an assert?