[MRG] Use projected gradient solver in transform to support sparse matrices

Instead of using the scipy.optimize.nnls (as until now) or the l-bfgs solver (as I am experimenting in #2263.

Fixes #2124.