MAINT: pchanial's improvement of input validation in sparse's __mul__

Retry of @pchanial's https://github.com/scipy/scipy/pull/4066, this time with tests and in its own PR branch.  Also changed `raise NotImplemented` to `raise NotImplementedError`.
Shouldn't this `return NotImplemented` instead of raising an error? In any case, `NotImplementedError` is the wrong exception. That's for stub methods in class hierarchies indicating that a subclass should be used instead.