Fix an initialization bug in ProgramEvaluator.

The buffers used to store the per thread value of the gradient
were not set to zero at the beginning of each call to evaluate.

Change-Id: I9c8afea54a4e2e0b805164025da3023166a309af
diff --git a/internal/ceres/program_evaluator.h b/internal/ceres/program_evaluator.h
index 1fb44e1..1ecf4aa 100644
--- a/internal/ceres/program_evaluator.h
+++ b/internal/ceres/program_evaluator.h
@@ -138,6 +138,10 @@
     // Each thread gets it's own cost and evaluate scratch space.
     for (int i = 0; i < options_.num_threads; ++i) {
       evaluate_scratch_[i].cost = 0.0;
+      if (gradient != NULL) {
+        VectorRef(evaluate_scratch_[i].gradient.get(),
+                  program_->NumEffectiveParameters()).setZero();
+      }
     }
 
     // This bool is used to disable the loop if an error is encountered