Do not try the gradient step if TR step line search fails.

The line search used by the trust region minimizer when enforcing
the bounds constraints starts by using the trust region step
as the line search direction and if that fails, uses the gradient
as the fallback.

The problem with this logic is that the calling code only sees
whether one of the line searches succeeds or not. It does not see
that the fallback happened. So if the fallback line search suceeeds
it still thinks that the line search direction was the trust region
step. This is clearly wrong.

This change, removes the broken fallback logic. This has no effect
on current solution quality as it stands.

Change-Id: Ibc8edd98f77c782ec4708d1e66eaa76d6867b990
diff --git a/internal/ceres/trust_region_minimizer.cc b/internal/ceres/trust_region_minimizer.cc
index 2f81fcb..605284d 100644
--- a/internal/ceres/trust_region_minimizer.cc
+++ b/internal/ceres/trust_region_minimizer.cc
@@ -92,14 +92,7 @@
                                        &message)));
   LineSearch::Summary summary;
   line_search_function.Init(x, delta);
-  // Try the trust region step.
   line_search->Search(1.0, cost, gradient.dot(delta), &summary);
-  if (!summary.success) {
-    // If that was not successful, try the negative gradient as a
-    // search direction.
-    line_search_function.Init(x, -gradient);
-    line_search->Search(1.0, cost, -gradient.squaredNorm(), &summary);
-  }
   return summary;
 }