[AutoDiff] Fix `@noDerivative` attributes in non-primary-files. (#29647)
Previously, `@noDerivative` attribute type-checking generated implicit
`@_semantics("autodiff.nonvarying")` attributes.
However, attributes in non-primary-files are not type-checked, so
`@noDerivative` attributes in non-primary-files are not processed.
Now, all `@noDerivative` attributes are lowered to
`[_semantics "autodiff.nonvarying"]` SIL function attributes.
Resolves TF-1145.