Fix SparseLinear

Fixed an issue with SparseLinear and added a test along with a new class
SparseJacobian (for testing sparse modules)