BUG: sparse: fix __eq__ for matrices with explicit zeros

`_cs_matrix.__eq__` is buggy for matrices with explicit zeros. It and `__ne__` are also buggy for scalar nan comparisons.

This PR fixes those bugs and adds generic tests that inject explicit zeros to matrices.

Fixes gh-3812