Fix downcasting errors

Both `CCSMatrix` and `CRSMatrix` don't actually support very large capacities. This is because capacity is calculated by `rows * cols` - and as both are integers, the result overflows.