[Fix] Bugs and performance in "Difference.Gradient".

Fixed bugs in extrapolation and improved numerical differentiation by parallel calculation.