When the driver program used coo_sparse, use special slicing code

We found that coo_matrix performs better than dok_matrix,
but it doesn't support slicing. This implements that manually
to work the same way as the last window patch did with dok_matrix.