[AutoDiff] AD reference counting hotfix. (#22242)
Hotfix for SR-9804 that unconditionally retains `seed`.
Note that this hotfix was not sufficient for undoing the `NO_ADJOINT(RetainValue)` hack.
Some tests fail if `NO_ADJOINT(RetainValue)` is removed and
`REFCOUNTING_ADJOINT(RetainValue, ReleaseValue)` is uncommented.
A more principled fix (changing `AdjointValue` to behave like `ManagedValue`) is coming soon.
Temporarily resolves SR-9804.