BUG: sparse/sparsetools: catch c++ exceptions 

These can appear e.g. in out-of-memory situations or from other causes inside STL.