Sparse binary operators now work on mixed type sparse matrices also.
The code could perhaps be more compact and reusable.
fix #2613