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/docs/source/building.rst b/docs/source/building.rst
index fa81975..c2d7e24 100644
--- a/docs/source/building.rst
+++ b/docs/source/building.rst
@@ -320,6 +320,11 @@
    the ``SPARSE_SCHUR`` solver, you can disable some of the template
    specializations by using this flag.
 
+#. ``-DLINE_SEARCH_MINIMIZER=OFF``: The line search based minimizer is
+   mostly suitable for large scale optimization problems, or when sparse
+   linear algebra libraries are not available. You can further save on
+   some compile time and binary size by using this flag.
+
 #. ``-DOPENMP=OFF``: On certain platforms like Android,
    multi-threading with ``OpenMP`` is not supported. Use this flag to
    disable multithreading.