CodeGen: Refactor SetLLVMFunctionAttributesForDefinition to use an AttrBuilder.

Adding attributes to a uniqued set has become expensive, don't do it more often
than necessary. No functionality change.