Move the GradientCheckingCostFunction to DynamicNumericDiffCostFunction. Also fix a const correctness issue with DynamicNumericDiffCostFunction. Change-Id: Id446810f43374e7b7db7fe4dd01a891e3c54abb9
Change-Id: I11945c455eb3fef9bfb952f5a30d657542fbccae
Change-Id: I0ec85218e82d1714279d41f7635104d480fb91c3