[NFC][clang][CodeGen] Extract setSectionAndTargetAttributes (#248282)
Split the part of `setNonAliasAttributes` which describes the
definition (section, target CPU and features, target attributes) from
the part which describes its symbol (`SetCommonAttributes`, `retain`),
so a caller can apply only the former.
Needed by #234415.
Assisted-by: Gemini