Improved norm computations

This series of commits fixes two issues:

* dimension-wise norm computations now work for CudaTensors
* 0-norm computed correctly for both regular tensors and CudaTensors