Dot

Added dot function for sparse matrix.
I'm not sure about `__eq__` and `__hash__`.  On one hand, they don't take grad_preserves_dense and structured_grad into account.  But on the other hand, these parameters only have an effect on the grad(), not on the runtime behavior.