[lld] Update cgdata-* tests to not use subshells
Subshells are not supported in the lit internal shell. We can remove
them by constructing sed commands directly inside of a separate file.
Towards #102700.
Reviewers: ilovepi, MaskRay, petrhosek, mysterymath, cmtice, kyulee-com
Reviewed By: MaskRay, cmtice, petrhosek
Pull Request: https://github.com/llvm/llvm-project/pull/156533