Modularize the build.

1. Add -DLINE_SEARCH_MINIMIZER to CMake to make the line search
   minimizer optional.
2. Better handling of -DSUITESPARSE/-DCXSPARSE in top level cmake
   file.
3. Disable code which will never be used if SuiteSparse and/or
   CXSparse is not available.
4. Update build docs.
5. Update jni/Android.mk
6. Minor lint cleanup from William Rucklidge.

Change-Id: If60460a858000df82faed7a6bb056dd2bfdde562
diff --git a/internal/ceres/visibility_based_preconditioner.cc b/internal/ceres/visibility_based_preconditioner.cc
index a75d6f0..9c92190 100644
--- a/internal/ceres/visibility_based_preconditioner.cc
+++ b/internal/ceres/visibility_based_preconditioner.cc
@@ -28,6 +28,8 @@
 //
 // Author: sameeragarwal@google.com (Sameer Agarwal)
 
+#ifndef CERES_NO_SUITESPARSE
+
 #include "ceres/visibility_based_preconditioner.h"
 
 #include <algorithm>
@@ -62,7 +64,6 @@
 static const double kSizePenaltyWeight = 3.0;
 static const double kSimilarityPenaltyWeight = 0.0;
 
-#ifndef CERES_NO_SUITESPARSE
 VisibilityBasedPreconditioner::VisibilityBasedPreconditioner(
     const CompressedRowBlockStructure& bs,
     const Preconditioner::Options& options)
@@ -584,7 +585,7 @@
   }
 }
 
-#endif  // CERES_NO_SUITESPARSE
-
 }  // namespace internal
 }  // namespace ceres
+
+#endif  // CERES_NO_SUITESPARSE