Enable visibility based preconditioners for CX_SPARSE and EIGEN_SPARSE

CLUSTER_JACOBI and CLUSTER_TRIDIAGONAL preconditioners require a sparse
Cholesky factorization library. Previously this code was hard coded to
use SuiteSparse. Once SparseCholesky abstraction was introduced, it
became possible to use it with Eigen or CXSParse.

Unfortunately the old code path that was enforcing the requirement
of SuiteSparse was not removed.

This change does the following:

1. Remove the SUITE_SPARSE restriction on CLUSTER_TRIDIAGONAL and
   CLUSTER_JACOBI
2. Redo the checking code to be ifdef free and more general.
3. Add bundle adjustment tests to test these configurations.

Thanks to Bjorn Piltz for catching and reporting this bug.

Change-Id: I637791f6f8149694b6aa75f6a4b6417398cb9590
diff --git a/internal/ceres/generate_bundle_adjustment_tests.py b/internal/ceres/generate_bundle_adjustment_tests.py
index 89cf8c7..86452b5 100644
--- a/internal/ceres/generate_bundle_adjustment_tests.py
+++ b/internal/ceres/generate_bundle_adjustment_tests.py
@@ -47,7 +47,11 @@
   ('ITERATIVE_SCHUR',        'NO_SPARSE',        'JACOBI'),
   ('ITERATIVE_SCHUR',        'NO_SPARSE',        'SCHUR_JACOBI'),
   ('ITERATIVE_SCHUR',        'SUITE_SPARSE',     'CLUSTER_JACOBI'),
+  ('ITERATIVE_SCHUR',        'EIGEN_SPARSE',     'CLUSTER_JACOBI'),
+  ('ITERATIVE_SCHUR',        'CX_SPARSE',        'CLUSTER_JACOBI'),
   ('ITERATIVE_SCHUR',        'SUITE_SPARSE',     'CLUSTER_TRIDIAGONAL'),
+  ('ITERATIVE_SCHUR',        'EIGEN_SPARSE',     'CLUSTER_TRIDIAGONAL'),
+  ('ITERATIVE_SCHUR',        'CX_SPARSE',        'CLUSTER_TRIDIAGONAL'),
   ('SPARSE_NORMAL_CHOLESKY', 'SUITE_SPARSE',     'IDENTITY'),
   ('SPARSE_NORMAL_CHOLESKY', 'EIGEN_SPARSE',     'IDENTITY'),
   ('SPARSE_NORMAL_CHOLESKY', 'CX_SPARSE',        'IDENTITY'),
@@ -122,13 +126,14 @@
 TEST_F(BundleAdjustmentTest,
        %(test_class_name)s) {  // NOLINT
    BundleAdjustmentProblem bundle_adjustment_problem;
-   Solver::Options* options = bundle_adjustment_problem.mutable_solver_options();
+   Solver::Options* options =
+     bundle_adjustment_problem.mutable_solver_options();
    options->num_threads = %(num_threads)s;
    options->linear_solver_type = %(linear_solver)s;
    options->sparse_linear_algebra_library_type = %(sparse_backend)s;
    options->preconditioner_type = %(preconditioner)s;
    if (%(ordering)s) {
-    options->linear_solver_ordering.reset();
+     options->linear_solver_ordering.reset();
    }
    Problem* problem = bundle_adjustment_problem.mutable_problem();
    RunSolverForConfigAndExpectResidualsMatch(*options, problem);