Trace is the New AutoDiff -- Unlocking Efficient Optimization of Computational Workflows