ENH SGD Cython improvements

* nogil declarations where possible (but no with nogil blocks, since the
  performance benefit of those is not clear)
* use BLAS where appropriate
* replaced DOUBLE by double, INTEGER and int32 by int/np.intc, since that's
  the type used by scipy.sparse
* explicit checks that dataset dims don't exceed INT_MAX
* replaced an np.all by an explicit loop (npymath library for C99 isfinite)
Issue #2455: Make RBM work with sparse input when verbose=True.
Change RBM sparse format from CSC to CSR.
Cosmetic changes.
Add issparse import.
Cosmetic changes.
ENH 10x speedup in dump_svmlight_format

As measured by dumping

X = rand(10000, 4000, density=.0125)
y = np.random.randint(0, 5, X.shape[0])

to /dev/null.
DOC: NMF narrative: describe optimization problem
FIX #2372: StratifiedKFold less impact on the original order of samples.
Fix accidental doctest breakage.
Instead of linking to NB, explain the problem inside the test itself.

I'm using a smaller number of examples from the digits dataset because
that cuts down test execution time for me from 17s to 4s, and still
yields the very similar results.
Avoid list, preallocate a numpy array for indices instead.

It appears that the sorted() call is unnecessary here.
Update comment with numbers for when we run with 800 samples.
Add entry for #2372 to whats_new.rst
More detailed entry for StratifiedKFold fix in whats_new.rst
Revert "More detailed entry for StratifiedKFold fix in whats_new.rst"

This reverts commit fee660c62d08962839a7875641e7719b03b26d26.
Revert "Add entry for #2372 to whats_new.rst"

This reverts commit 6c7e7515395290981dfff4c5f003e3ca5d629603.
Revert "Update comment with numbers for when we run with 800 samples."

This reverts commit 17f62e69cd75cad14f2c78f0f88c8b20dc528a58.
Revert "Avoid list, preallocate a numpy array for indices instead."

This reverts commit bbaa9d9634d8c3bfda69269eb959aa00fa22f207.
Revert "Instead of linking to NB, explain the problem inside the test itself."

This reverts commit cf9788cb07abcedee68fff808ef6132ab3b92553.