[AutoDiff] Fix memory leaks.
The primal value struct should not be retained before the partial application of the pullback because it's already `+1` and owned solely by the pullback. Original results should be retained because they are separately returned along with the pullback.