Unity: Accelerating DNN Training Through Joint Optimization of Algebraic Transformations and Parallelization