Merge pull request #3389 from pv/sparse-downcast

BUG: sparse: downcast 64-bit indices safely to intp when required
Merge pull request #3272 from pv/fix-setdiag

BUG: sparse: fix bugs in dia_matrix.setdiag
BUG: sparse/lil: fix up Cython bugs in fused type lookup

Cython (up to 0.20) fail to look up function signature for lil_insert.
Look it up based on dtype manually instead.