Efficient operations of Sparse

Here are the changes in this PR. All changes are in sparse.py

1. Fixed row method. It was not giving the right answer earlier. Earlier it was just returning a list of zeros, even if there are non-zero elements in the concerned row
2. Made row_list and col_list more efficient. Earlier the running time for these operatons for an m*n matrix with nnz non-zero elements was theta(m*n). I replaced that with the new code whose running time is theta(nnz). This way we can avoid redundant look ups. We do not need to check all the rows and columns. New code just checks non-zero elements and gives right answers. 
3. New function inv_tup used col_list.