Added tests for row operations.
Fixed the case where a row operation on a sparse matrix is applied using the same row for "from" and "to".