Optimal Regulation of Impulsive Fractional Differential Equation with Delay and Application to Nonlinear Fractional Heat Equation