[RFC] Refactoring CGAtomic into LLVMFrontend

@jyknight I created an alternative implementation trying to mimic LLVM’s BuildLibCall.h. That is, a single standalone function that decides how to emit a generic compare-exchange instruction taking target information into account.

Add emitAtomicCompareExchangeBuiltin helper function · Pull Request #101966 · llvm/llvm-project (github.com)

As you may see there is a lot more complexity than bitcasting and type-size. Please let me know what you think.