[AutoDiff] Add cloned curry thunks to generated function list. (#27720)
Add cloned curry thunks to generated function list so that they will be
deleted upon clean up if any diagnostics are emitted.
Resolves [TF-918](https://bugs.swift.org/browse/TF-918): crash due to invalid cloned curry thunk that was not deleted
during clean up.