Cuda mean

This adds CudaTensor.mean of the form y = torch.mean(x,dim).
I added tests for mean, var, and std, but realized the latter two will be a bit harder to implement, so haven't implemented these yet.