Unifying the mean functions for scalar or vector dimensions.

This allows us to use Julia's fast sum() in both cases. Also removing the
squeeze() of the result, as that is a separate issue that should be discussed
language-wide for all similar functions like sum(), var(), etc...