Merge pull request #3215 from pv/swig-badalloc

 BUG: sparse/sparsetools: catch c++ exceptions
MAINT: mark SWIG-generated files as binary
ENH: sparse: enable sparsetools to support long long indices

Thanks to peb for the patch.
ENH: sparse: replace intc index type by automatically determined
MAINT: sparse: add a generate_sparsetools.py
TST: sparse: add initial tests for 64-bit indices
BUG: sparse: trigger 64-bit index cast in more locations
BUG: sparse: play safe and do 64-bit cast earlier
BUG: sparse: swap long long -> int64 & int -> int32 in sparsetools

This ensures things keep working as expected also on platforms
with sizeof(int) != 32 and sizeof(long long) != 64
GEN: sparse: regenerate sparsetools files
BUG: sparse: matrix multiply pass 1 must allow for fill-in

Since we don't know the resulting fill-in from the matrix
multiplication, choose a large enough data type to accommodate also a
dense result. If the result nnz proves to be smaller, the data type is
reduced afterward.
BUG: sparse: fix one missing index type determination
BUG: sparse: fix sparse.randn to select index type properly
BUG: sparse: take care of correcting index type in CSR/CSC setitem
BUG: sparse: select correct index type on empty matrix init for BSR/CSR/CSC
BUG: sparse: correct index data type in bmat