Optional return tensor for CudaTensor reductions

Previously this needed to be called as

	y:sum(x,1)

Now it can be called as

	x:sum(1)

as for regular tensors.